I have a web query with JSON response as:
{
\"status\":true,
\"result\":
{
\"id\":\"1\",
\"name\":\"ABC 1\",
\"email\":
Simply use JsonElement
insted of JSONobject
. Like:
@GET("/stockers/login")
Call<JsonElement> getLogin(
@Query("email") String email,
@Query("password") String password
);
Use JacksonConverterFactory instead of GsonConverterFactory while setting up Retrofit. Now you can directly work with JsonObject responses.
compile 'com.squareup.retrofit2:converter-jackson:2.1.0'