Get JSONObject from retrofit2 response
How to get in retrofit2 an unknown JSON object from a response object like this request (using OkHttp3):
Observable<Response<MyResponseObject>> apiCall(@Body body);
MyResponseObject looks like this:
public class MyResponseObject {
@SerializedName("title")
public String title;
@SerializedName("info")
public JSONObject info;
@SerializedName("question_id")
public String questionId;
}
I want to receive
JSONObject Information
like a normal object.
+3
source to share
2 answers