Getting simple JSON object response using Retrofit library

后端 未结 8 2052
感动是毒
感动是毒 2020-12-17 17:59

I have a web query with JSON response as:

{
    \"status\":true,
    \"result\":
      {
        \"id\":\"1\",
        \"name\":\"ABC 1\",
        \"email\":         


        
8条回答
  •  无人及你
    2020-12-17 18:32

    Just define the type of the object you want to get as a String as com.google.gson.JsonObject instead of String and call .toString() on that object to get the JSON string itself.

提交回复
热议问题