android - Jackson JSONArray nested in a JSONArray not parsing -
not sure if i'm using correct syntax or declaring classes right doesn't seem parse jsonarray inside jsonarray.
what doing wrong?
here's json file:
{ "response": { "status": 200 }, "items": [ { "item": [ { "body": "computing", "subject": "math", "attachment": false } ] }, { "item": { "body": "analytics", "subject": "quant", "attachment": true } } ], "score": 10, "uri": "http://localhost/v2.0.0/surveys/5511fa0b7ccabf820b08172a/5512d3de7ccabf820b081731/", "thesis": { "submitted": false, "title": "masters", "field": "sciences" } }
here classes i'm using:
public class thing { public response response; public arraylist<itemwrapper> items; public int score; public uri uri; public thesis thesis; public uri geturi() { return uri; } public void seturi(uri uri) { this.uri = uri; } public response getresponse() { return response; } public void setresponse(response response) { this.response = response; } public arraylist<itemwrapper> getitems() { return items; } public void setitems(arraylist<itemwrapper> items) { this.items = items; } public int getscore() { return score; } public void setscore(int score) { this.score = score; } public thesis getthesis() { return thesis; } public void setthesis(thesis thesis) { this.thesis = thesis; } } class response { public int status; public int getstatus() { return status; } public void setstatus(int status) { this.status = status; } } class itemwrapper { public arraylist<item> item; public arraylist<item> getitem() { return item; } public void setitem(arraylist<item> item) { this.item = item; } } class item { public string body; public string subject; public boolean attachment; public string getbody() { return body; } public void setbody(string body) { this.body = body; } public string getsubject() { return subject; } public void setsubject(string subject) { this.subject = subject; } public boolean isattachment() { return attachment; } public void setattachment(boolean attachment) { this.attachment = attachment; } } class thesis { public boolean submitted; public string title; public string field; public boolean issubmitted() { return submitted; } public void setsubmitted(boolean submitted) { this.submitted = submitted; } public string gettitle() { return title; } public void settitle(string title) { this.title = title; } public string getfield() { return field; } public void setfield(string field) { this.field = field; } }