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

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -