android - 使用Gson 和 Json 解析 json
访问量: 1978
gson:
Gson gson = new Gson(); JsonObject jsonObject = gson.fromJson(result, JsonObject.class); name.setText(jsonObject.get("name").getAsString());
JSON方式:
JSONObject json = new JSONObject(response_result); if(json.getInt("status") == 200){