java - how to convert Arraylist<myClass> in JSONArray -
i'm trying convert generic arraylist
in jsonarray
displaying null value.
but working fine if i'm trying display specific value arraylist
.
arraylist<myclass> experience = new arraylist<>(); ... //adding values log.v("testing", experience.get(0).company); //this showing value jsonarray json = new jsonarray(experience); log.v("testing", json.tostring()); //this showing [null]
there might problem recognizing andn converting "myclass" bean json.
try using gson library create json , parse object .
Comments
Post a Comment