1

Friends I have a json response like this

{"status":"1","responseCode":"1000","response":{"actorGuid":"1","daRemarks":"Device is Nonoperational","serialNumber":"1234567"}}

I am successfully fetching the status code using

String statusStr =  jsonObject.getString("status");

but I also need the serialNumber so please tell how do I fetch it. Please help me with the entire code to fetch it.

Regards

4

3 に答える 3

2
String serial = jsonObject.getJSONObject("response").getString("serialNumber");
于 2012-07-26T08:20:21.187 に答える
0
JSONObject responseJsonObject =  jsonObject.getJSONObject("response");
 String serialNumberStr =  responseJsonObject.getString("serialNumber");
于 2012-07-26T08:24:23.297 に答える
0

以下のコードを試すことができます

String serial= jsonObject.getJSONObject("response").getString("serialNumber");
于 2012-07-26T08:20:20.053 に答える