这是我的 Java 代码:
...
HttpResponse response = httpclient.execute(httppost);
HttpEntity responseEntity = response.getEntity();
JSONObject serverResponse = new JSONObject(EntityUtils.toString(responseEntity));
String error = serverResponse.getString("error");
text1.setText(error);
...
我无法解析 JSON。
JSON:
[{"error":"1"}]
谢谢!