PHPホストからjson応答を受け取っています
{"uid": "0"}
私はそれから0(すなわちuid値)を取得したい
私はそれを取得しようとしました..しかし例外がありました
これは私のコードです..
HttpEntity entity = response.getEntity();
} catch(Exception e) {
System.out.println("Exception : " + e.getMessage());
}
finally {
if (conn != null) {
try {
conn.close ();
}
catch (Exception e) { e.printStackTrace(); }
}
}
//convert response to string
/*
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(is, "iso-8859-1"),8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line+"\n");
}
is.close();
result = sb.toString();
} catch(Exception e) {
System.out.println("Exception : " + e.getMessage());
}
try
{
??????????????????????????
} catch(Exception e) { e.printStackTrace(); }