一、net.sf.json.JSONObject
JSONObject转VO/bean
- 参考文档 http://json-lib.sourceforge.net/apidocs/jdk15/net/sf/json/JSONObject.html
二、org.json.JSONObject
- 参考文档 https://stleary.github.io/JSON-java/org/json/JSONObject.html
三、fastJSON
- 参考文档 https://stleary.github.io/JSON-java/org/json/JSONObject.html
四、json与Null
org.json.JSONObject orgJSON = new org.json.JSONObject();
// The method put(String, Collection) is ambiguous for the type JSONObject
//orgJSON.put("null", null);
net.sf.json.JSONObject netJSON = new net.sf.json.JSONObject();
netJSON.put("null", null);
System.out.println("netJSON" + netJSON); // 控制台输出 : netJSON{}