{"66":{"waktu":"2013-10-01 12:45:11","hp":"+6285716157476","sms":"BKPM:\ntest ke budi","flash":"0","sts":"1"}}
答案 0 :(得分:2)
它出现在JSON结构中......使用JSON解析器来解析它
答案 1 :(得分:2)
将最简单的Json解析器用于String。
public static void main(String[] args) throws JSONException {
String jsonString = "{" +
" \"66\": {" +
" \"waktu\": \"2013-10-01 12:45:11\"," +
" \"hp\": \"+6285716157476\"," +
" \"sms\": \"BKPM:\\ntest ke budi\"," +
" \"flash\": \"0\"," +
" \"sts\": \"1\"" +
" }" +
"}";
JSONObject jsonObject = new JSONObject(jsonString);
JSONObject a = (JSONObject) jsonObject.get("66");
String sts = (String) a.get("sts");
System.out.println("sts=" + sts);
}
输出:
sts=1