Get nested JSON object with GSON using retrofit

前端 未结 13 1051
挽巷
挽巷 2020-11-22 17:04

I\'m consuming an API from my android app, and all the JSON responses are like this:

{
    \'status\': \'OK\',
    \'reason\': \'Everything was fine\',
    \         


        
13条回答
  •  广开言路
    2020-11-22 17:37

    Don't forget @SerializedName and @Expose annotations for all Class members and Inner Class members that most deserialized from JSON by GSON.

    Look at https://stackoverflow.com/a/40239512/1676736

提交回复
热议问题