{
"query":{
"count":1,
"created":"2014-09-13T07:32:01Z",
"lang":"en-US",
"results":{
"rate":{
"id":"USDINR",
"Name":"USD to INR",
"Rate":"60.8075",
"Date":"9/13/2014",
"Time":"3:23am",
"Ask":"60.815",
"Bid":"60.80"
}
}
}
}
我想得到RATE的值60.80754 在JAVA中的字符串请帮助
由于
答案 0 :(得分:2)
试试这个..
JSONObject obj = new JSONObject(string);
JSONObject query = obj.getJSONObject("query");
JSONObject results = query.getJSONObject("results");
JSONObject rate_obj = results.getJSONObject("rate");
String Rate = rate_obj.getString("Rate");