android - how to create jsonObject for bellow Structure in java -


     {      "datatable": [       {       "entityid": "2",       "userid": "5897",       "orgid": "p01",       "compid": "a0002",       "ip": "0",       "indent_no": "0",       "serial": "1",       "doc_dt": "06/04/2017",       "itm_cd": "100000397",       "qty": "6",       "rate": "9",       "from_loc": "0",       "remark": "re",       "req_dt": "06/04/2017",       "add_spec": "ass",       "project": "0",       "ind_type": "r",       "ind_cat": "rev",       "purpose": "p"      }                ],      "mode": "i"     } 

how create json object in java using above code please give me code. searched on stack overflow have not json object code same json formate

here sample code snippet.

class datatable{     string entityid;     .... define fileds here. }  class data{     list <'datatable> list;     string mode; } 

Comments

Popular posts from this blog

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

c# - Update a combobox from a presenter (MVP) -