转
org.json包
http://www.json.org/java/index.html
<!--[if !supportLists]-->1. <!--[endif]-->JSONObject,用一个HashMap来保存一个JSON对象的所有属性。
<!--[if !supportLists]-->2.
<!--[endif]-->JSONArray用ArrayList来保存数据。JSON来自javascript,javascript
中Array也是Object,不知这里是如何保存这种关系的。
<!--[if !supportLists]-->3. <!--[endif]-->一些跟字符串有关的类,以及异常类。
<!--[if !supportLists]-->4. <!--[endif]-->一些工具类,比如xml和json转换的类,将http头和cookies转换为json的类,
基于org.json包的JSON-LIB:bean,map,collection,java array,xml与json间的转换。
http://json-lib.sourceforge.net/
http://json-lib.sourceforge.net/usage.html
Stringtree JSON:JSON与java对象间的转换
http://www.stringtree.org/stringtree-json.html
三个关键类:
JSONReader.java
JSONWriter.java
JSONValidator.java
JSONValidator用来检查JSON的有效性。
JSONReader将一个正确形式的JSON字符串转换为一个java对象。
JSONWriter将一个java对象转换为一个JSON字符串。
JSONT:基于js和自定义规则,转换JSON为任意其他格式
http://goessner.net/articles/jsont/
没有评论:
发表评论