json - JSONParser doesn't work in Android -


this type of json object coming android device :

{"successful":true,"value":{"materials":[{"materialid":999999,"type":1,"stockno":1,"weight":1}]}}

i'm trying parse :

public string parsematerial(jsonobject object){ try{     jsonarray objectarray = object.getjsonarray("value");     } catch(jsonexception e){     log.d("jsonparser=>error", e.getmessage());     } } 

what in logcat :

d/jsonparser=>error: value:{"materials":[{"materialid":999999,"type":1,"stockno":1,"weight":1}]}

what doing wrong here? why program fall in catch block? thanks.

cause value not json array


Comments

Popular posts from this blog

How to show in django cms breadcrumbs full path? -

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -