私は JSONObject に苦労しています。私はすでにいくつかのjsonを返し、それをオブジェクトとオブジェクトのリストに正常に変換しました。私の今、私は立ち往生しています。
これは私が得ている JSONObject です:
{"Result":true,"Messages":["Goe bezig!"]}
メッセージを取得できますが、結果でブール値を取得できないようです。誰かがそれを取得する方法を説明できますか?
コードは次のとおりです。
public boolean Convert(JSONObject json) {
try
{
return json.getBoolean("Result");
}
catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
}
}