软件编程
位置:首页>> 软件编程>> java编程>> Java获取json数组对象的实例讲解

Java获取json数组对象的实例讲解

作者:蓝色当当风  发布时间:2023-08-24 14:55:28 

标签:Java,json,数组,对象

如下所示:

JSONArray jsonArray1 = jsonObject.getJSONArray("result");
 for (int i = 0; i < jsonArray1.length(); i++) {
 JSONObject temp = (JSONObject) jsonArray1.get(i);
 String x = temp.getString("x");
 String y = temp.getString("y");
 if (x == null || y == null) {
   flag = false;
   handler.sendEmptyMessage(NO_LOCATION);
 }
}

来源:https://blog.csdn.net/u010770184/article/details/71439578

0
投稿

猜你喜欢

手机版 软件编程 asp之家 www.aspxhome.com