您的JSON字符串以JSONArray开头。
在这里示例代码,尝试一下。
JSonArray mJsonArray = new JSonArray(jsonStr); JSonObject mJsonObject = mJsonArray.getJSonObject(0); String pmid = mJsonObject.getString("pmid"); String name = mJsonObject.getString("name"); String result = mJsonObject.getString("result"); JSonArray mJsonArrayProperty = mJsonObject.getJSonArray("properties"); for (int i = 0; i < mJsonArrayProperty.length(); i++) { JSonObject mJsonObjectProperty = mJsonArrayProperty.getJSonObject(i); String prop_id = mJsonObjectProperty.getString("prop_id"); String prop_name = mJsonObjectProperty.getString("prop_name"); String address = mJsonObjectProperty.getString("address"); String city = mJsonObjectProperty.getString("city"); String state = mJsonObjectProperty.getString("state"); String zip = mJsonObjectProperty.getString("zip"); String lat = mJsonObjectProperty.getString("lat"); String lon = mJsonObjectProperty.getString("long"); }
检查Android JSON解析教程
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)