从网络服务器中得到响应:
response = [{"result":"false"}]
不知道应该怎么解析它?
从网络服务器中得到响应:
response = [{"result":"false"}]
不知道应该怎么解析它?
JSONArray jsonArray = response.getJSONArray();
for (int i = 0; i < jsonArray.length(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
String result = jsonObject.getString("result");
}
顺便给你推荐一个查看json数据的网站:
http://www.json.org.cn/tools/JSONEditorOnline/index.htm