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
Post a Comment