Retrofit parse JSON dynamic keys
I'm a newbie in Retrofit. How to parse the Json below using retrofit? { "data": { "Aatrox": { "id": 266, "title": "a Espada Darkin", "name": "Aatrox", "key": "Aatrox" }, "Thresh": { "id": 412, "title": "o Guardião das Correntes", "name": "Thresh", "key": "Thresh" } }, "type":"champion", "version":"6.23.1" } You could make your model POJO contain a Map<String, Champion> to deserialize into, to deal with the dynamic keys. Example: public class ChampionData { public Map<String, Champion> data; public String type; public String version; } public class Champion { public int id; public String title;