java - How to parse JSON object without tag -


how parse json array without object tags? how can files?

{     "id": "476",     //idобращения"status": "2",     //Статус: 0=>'Нарассмотрении',     1=>'Вработе',     2=>'Выполнено',     3=>'Отклонено'"latitude": "56.007831",     //геокоординаты,     заданныеприподачеобращения"longitude": "35.970359",     "message": "dfghdfgh",     //текстобращения"published_at": "2014-01-30 18:13:29",     //датаподачиобращения"comments": [         {             "id": 133,             "message": "aaa",             //тексткомментария(админ/пользователь)"isadmin": "0",             //ответданадминистратором(isadmin=1)"curr_status": "1"//статусобращениянамоментответа         },         {             "id": 134,             "message": "112",             "isadmin": "1",             "curr_status": "1"         },         {             "id": 136,             "message": "",             "isadmin": "1",             "curr_status": "2"         },         {             "id": 137,             "message": "123",             "isadmin": "1",             "curr_status": "2"         }     ],     "files": [         “”,         ””……””//image(base64encoded)     ] } 

  jsonobject result = new jsonobject(s);             id = result.getint("id");             status = result.getint("status");             latitude = result.getdouble("latitude");             longitude = result.getdouble("longitude");             message = result.getstring("message");             dateofpublish = result.getstring("published_at");             jsonarray jsonarray = result.getjsonarray("files");              (int j = 0; j < jsonarray.length(); j++) {                 //here want files             } 

try calling method. should it.

jsonarray.get


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -