JSONObject 解析
来源:互联网 发布:java线程同步和异步 编辑:程序博客网 时间:2024/06/07 01:09
之前解析json一直用get的方法,但是如果抛异常会让解析中断很烦人。今天发现了JSONObject还提供了一个更好用的方法opt。看来以后文档还是要更加认真的读的,下面是文档中的原文。
A JSONObject constructor can be used to convert an external form JSON text into an internal form whose values can be retrieved with the get
and opt
methods, or to convert values into a JSON text using the put
and toString
methods. A get
method returns a value if one can be found, and throws an exception if one cannot be found. An opt
method returns a default value instead of throwing an exception, and so is useful for obtaining optional values.
详见:http://www.json.org/javadoc/org/json/JSONObject.html
1 0
- JSONObject 解析
- JSONObject 解析
- JSONObject解析
- jsonobject解析数据
- JSONObject对象的解析
- JSONObject 解析json
- JsonObject 解析 json
- 数据解析(一):JsonObject
- JSONObject/JSONArray解析json
- JsonObject和JsonArray解析
- 解析JSON-JSONObject/GSON
- JSONObject 解析json用法
- 关于JSONObject解析json
- android json解析-JSONObject
- javascript 解析JSONArray和JSONObject
- 系统自带JSonObject解析
- 利用JsonObject解析Json数据
- JSONObject 解析json的步骤
- PCL: Surface模块之GreedyProjectionTriangulation表面重建
- 一些iOS高效开源类库
- H264解码器源码(Android 1.6 版)
- EstimoteSDK-Android 文档翻译
- .net日期字符串的处理
- JSONObject 解析
- 聚米珠
- C2B模式的逆天行
- Nginx反向代理的配置
- APP的推广
- HttpClient入门
- Scala学习——模式匹配和样例类
- codeforces#256DIV2 D题Multiplication Table
- 非阻塞socket调用connect, epoll和select检查连接情况示例