データをサーバーに送信し、形式のjson応答を解析しようとしていますが、{"count":"2"}
例外を超えています
これは私のコードです
post(serverUrl, params);
HttpClient httpClient = new DefaultHttpClient();
try{
get = new HttpPost(url);
r = httpClient.execute(get);
he = r.getEntity();
InputStream is = he.getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"), 8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) { sb.append(line + "\n"); }
String result = sb.toString();
jObj = new JSONObject(result);
Log.d(TAG, "Count is" + jObj);
count = jObj.getString("count");
Log.d(TAG, "Count is" + count);
}
catch (Exception e) { e.printStackTrace(); }