Vadivel Vadivel - 15 days ago 10
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

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:

@GET("url")
Call<JsonElement> apiCall();