Ext 端用
//Encodes an Object, Array or other value Ext.util.JSON.encode (Mixed o) : String //Decodes (parses) a JSON string to an object. If the JSON is invalid, this //function throws a SyntaxError. Ext.util.JSON.decode (String json) : Object
Java 端用
//json-lib
//params 例如"{xx:'yy'}";
JSONObject jsonParams = JSONObject.fromObject(params);
String xx= jsonParams.getString("xx");
//json-lib
JSONSerializer.toJSON(javabean || list of javabean).toString();
//return string
{xx:yy} or [{xx:yy},{xx2:yy2}]