你是否尝试过使用
JSONArray.getJSONObject(int)和
JSONArray.length()创建for循环:
for (int i = 0; i < recs.length(); ++i) { JSonObject rec = recs.getJSonObject(i); int id = rec.getInt("id"); String loc = rec.getString("loc"); // ...}
你是否尝试过使用
JSONArray.getJSONObject(int)和
JSONArray.length()创建for循环:
for (int i = 0; i < recs.length(); ++i) { JSonObject rec = recs.getJSonObject(i); int id = rec.getInt("id"); String loc = rec.getString("loc"); // ...}