Vadivel Vadivel - 1 year ago 82
Android Question

Is it possible to use retrofit without model class?

i have problem to use model class in retrofit lib. A backend side field name has changed.

Is it possible to get response without model class?

Answer Source

It is perfectly possible using different return values. I assume that you currently use Gson to deserialize JSON responses, and they get converted to the actual class. However, you may choose to convert the returned response to JsonElement (or some more specific JSON class), in that case you will get a JSON item which you can manipulate as you wish to. Something like:

Call<JsonElement> apiCall();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download