java - org.json.JSONException: No value for status Android Parsing -




hello have error in code in json parsing error

org.json.jsonexception: no value status

jsonobject c = new jsonobject();  try {      if(c.has("status")) { 

this json format, have problem in getting status value.

{     "id": "7",     "nome": "dfsdfsdfsdff",     "email": "and@gmail.com",     "status": "1" } 

you need put response in jsonobject constructor

jsonobject c = new jsonobject(yourresponsestring); //                            ^^^^^^^^^^^ 

currently empty hence no status or else





wiki

Comments

Popular posts from this blog

elasticsearch - what is the equivalent data type for geo_point in hibernate search? -

firebase - How to wait value in Ionic 2 -

Jenkins: find build number for git commit -