0
에 JSON의 값을 취득하는 것은 귀하가 JSONArray로 된 JSONObject로 변환하려고안드로이드 응용 프로그램
my json result = {"message":"Json","success":1}
Value {"message":"Json","success":1} of type org.json.JSONObject cannot be converted to JSONArray
my code :
HttpEntity ent= resp.getEntity();
text = EntityUtils.toString(ent);
JSONArray json = new JSONArray(text);
JSONObject jObj = json.getJSONObject(0);
Integer sucess= jObj.getInt("success");
if (sucess == 1){
Log.v("JSON" ,"es 1");
}