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

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -