1
I have this JSON on the server side:
[{"idreg":"271896",
"code":"USD",
"codein":"BRL",
"name":"D\u00f3lar Comercial",
"high":"3.2652",
"pctChange":"-0.939",
"open":"0",
"bid":"3.2492",
"ask":"3.2497"}]
I want to use the value of "Ask" but I don’t know exactly how to interpret it
Here is my code:
JsonObjectRequest obreq = new JsonObjectRequest(Request.Method.GET, url, new
Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
try {
JSONObject obj = response.getJSONObject("ask");
}
JSONcatch (JSONException e) {
e.printStackTrace();
}
}
},null);
This way it does not return me the value, what I must do to correct?