如何通过改造来解析iterate-name json?

时间:2015-05-30 15:09:55

标签: android json retrofit

我正在使用Retrofit和GSON。我有一个JSON响应作为JSONArray,但我不知道如何使用模型类来解析它。我的回答如下:

{  
   "1":{  
      "id":"1",
      "parentid":"0",
      "posi":"1",
      "name":"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f",
      "alt_name":"main",
      "icon":"",
      "skin":"",
      "descr":"",
      "keywords":"",
      "news_sort":"",
      "news_msort":"",
      "news_number":"0",
      "short_tpl":"",
      "full_tpl":"",
      "metatitle":"",
      "show_sub":"0",
      "allow_rss":"1"
   },
   "5":{  
      "id":"5",
      "parentid":"1",
      "posi":"1",
      "name":"Edited cat name",
      "alt_name":"newcater2",
      "icon":"",
      "skin":"",
      "descr":"",
      "keywords":"",
      "news_sort":"",
      "news_msort":"",
      "news_number":"0",
      "short_tpl":"",
      "full_tpl":"",
      "metatitle":"",
      "show_sub":"1",
      "allow_rss":"1"
   }
}

0 个答案:

没有答案