1. 程式人生 > >JSON與null

JSON與null

new body collect object clas code down ava n)

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{}

JSON與null