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

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -