Convert Json to an object in Android with gson

后端 未结 3 1893
一个人的身影
一个人的身影 2021-01-22 01:44

I have a JSON array with a lot of entries and want to deserialize each check into a single object with gson. My problem is to find the proper object structure for it.



        
3条回答
  •  失恋的感觉
    2021-01-22 02:01

    You need to set the annotation like this to use GSON

    public class Client {
            @SerializedName("client")
            public String client;
    
            @SerializedName("check")
            public Check check;
        }
    

提交回复
热议问题