-3

Then how do I create the POJO for such type and how do I use it in retrofit. My JSON response is of this type. This is like an array and i know how to parse only the simple ones.

 ["a",{"a_id":"1","a":"10","n":"100"},
 {"a_id":"2","a":"100","n":"10000"},
 {"a_id":"3","a":"500","n":"5000"},
 {"a_id":"4","a":"1000","n":"100000"},
 {"a_id":"5","a":"5000","n":"500000"}]
Girish
  • 21
  • 6

1 Answers1

1

For the Pojo Simply use this link http://www.jsonschema2pojo.org/, paste response into, and select Annotation style:Gson, Source type:Json and leave others as default.

Furkan Karacan
  • 152
  • 2
  • 15