I have to make a get request from a server which gives me a lot of information. From what I found searching it seems like I can do this only with model classes. Thing is that to cover all the response the server sends to me I have to make 53 model classes in which to store the information.
I was wondering if there is a simpler method, like to store the information in a JSON or something.
I am using Retrofit with OKHttp.
getTimeSessionsCall.enqueue(new Callback<JSONObject>() {
@Override
public void onResponse(Call<JSONObject> call, Response<JSONObject> response) {
Log.i("getTimeSessions",Integer.toString(response.code()));
}
@Override
public void onFailure(Call<JSONObject> call, Throwable t) {
}
});
I tried this kind of call and it stores nothing. The code is 200, but the JSON remains empty.
Thank you in advance!