java - Convert string to JSON and get value -


i have string:

{"markers":[{"tag":"1","dep":"2"}]} 

how convert json , value tag , dep?

you need jsonobject this

jsonobjectrequest jsobjrequest = new jsonobjectrequest(request.method.get,url, null, new response.listener<jsonobject>() {      @override     public void onresponse(jsonobject response) {         string tag, dep;          jsonarray jarray = response.getjsonarray("markers");         jsonobject msg = jarray.getjsonobject(0);         tag = msg.getstring("tag");         dep = msg.getstring("dep");     } } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -