I canβt figure it out. I looked at a couple of SO posts ( here and here ), and my situation is just a little different.
I'm not sure if I need to register a new TypeToken or what. But my JSON object looks like this:
{ "id": 6, "error": "0", "dates": { 34234 : "2011-01-01"
I created both of my objects:
public class Response { public Integer id; public String error; public DateList dates; }
Single file:
public class DateList { public List<Map<Integer, String>> dateString; }
I'm not sure how to tighten it so that everything is correct. The documentation doesn't seem to help ... And the other examples I saw analyze a user object, not a string type.
Thanks!
source share