net.sf.json
JSONObject jsonObject=new JSONObject();
String param="{'key1':'22222'}";
jsonObject=JSONObject.fromObject(param);
jsonObject.put("key2", "22222");
String nullString="22222";
System.out.println(jsonObject.getString("key1")==nullString);
System.out.println(jsonObject.getString("key2")==nullString);
<output>
false
true
转载于:https://blog.51cto.com/12341361/2048015