Parse Dynamic unknown named array Json using Retrofit

前端 未结 2 1105
挽巷
挽巷 2021-01-23 20:54

i\'m new to retrofit,below is the json

 {
  \"response\": \"success\",
  \"servicecode\": \"134\",
  \"forecast\": {
    \"month\": {
      \"jan\": [
        {
         


        
2条回答
  •  一个人的身影
    2021-01-23 21:42

    I would do it with a custom Json adapter using Gson lib. So you won't have to touch your data structures (if you can not anyway) neither add your infinite key 555.

    https://www.tutorialspoint.com/how-to-implement-custom-jsonadapter-using-gson-in-java

提交回复
热议问题