{ “响应”: { “类别”: [ “餐厅”, “沙龙”, “温泉”, “干洗店”, “汽车水疗中心”, “医院” ] } }
答案 0 :(得分:0)
试试这个,它可以是Pseudo Code
String json = <YourJSon String>
JSONObject object = new JSONObject(json);
JSONArray array = object.getJSONArray("Category");
for(int i =0; i<array.size();i++){
String s = array.get(i).getString();
}
答案 1 :(得分:0)
你可以这样做 -
try {
String json = <Your Json String>;
JSONObject response = new JSONObject(json);
JSONArray category = response.getJSONArray("Category");
for (int i = 0; i < category.length(); i++) {
Log.d("categories are", category.getString(i));
}
} catch (JSONException e) {
e.printStackTrace();
}