Eric N Eric N - 1 year ago 74
Java Question

Turning JSON list into POJO

Here's the JSON:


And my current POJO:

public class WantMessage {

Map<String, String> wantmap = new HashMap<String, String>();
public String EndPoint;

I get the "Endpoint" String in ok but am missing the data in the "Want" section. How would you pull in the want list?


wantmap has keys and values of type String. The map in json has int values. Try putting the numbers in double quotes, and see if it works.