json
来源:互联网 发布:mac磁盘工具抹掉win7 编辑:程序博客网 时间:2024/06/06 08:48
示例一:
String json = "{\"orderID\":1000,\"price\":3000,\"content\":\"在汇通驾校报名普通班学车\"}"; JSONObject o = new JSONObject(json); for (Iterator iter = o.keys(); iter.hasNext();) { System.out.println(o.getString((String)iter.next())); }
示例二:
String tt ="[{\"orderID\":1000,\"price\":3000,\"content\":\"在汇通驾校报名普通班学车\"},{\"orderID\":1003}]"; JSONArray o = new JSONArray(tt); for (int i=0;i<o.length();i++){ JSONObject order =(JSONObject)o.get(i); int orderID = order.getInt("orderID"); }
0 0
- Json
- JSON
- JSON
- JSON
- json
- JSON
- JSON
- json
- Json
- json
- JSON
- json
- json
- JSON
- json
- JSON
- JSON
- json
- C语言-求两个整数中的较大者
- wholesale nfl jerseys supply
- TextView
- 【转】使用Fiddler对手机应用进行抓包测试
- iis7下url重写后原本存在的html不能访问未能执行URL
- json
- Animation之Property Animation
- WIN32 API多线程编码--参数传递(二)
- hbase单机安装和配置
- jetty简介
- 数据库事务隔离级别
- CI problem:
- Java&&持有对象(容器小结)
- 单片机与安卓(java)字符串与字节,ascii之间的相互转换