1. toJSonString (对象或集合)(内套集合也可以)转JSON对象
JSonObject json = new JSonObject();
json.toJSonString(user)
2. JSON格式字符串与JSON对象之间的转换。
String j = "{"goodslist":[{"goods_id":1}],"name":"张三"}";
JSonObject jsonObject = JSONObject.parseObject(j);
或者
JSonObject jsonObject = JSON.parseObject(j);
3. json字符串-数组类型与JSONArray之间的转换
//json字符串-数组类型
private static final String JSON_ARRAY_STR = "[{"studentName":"lily","studentAge":12},{"studentName":"lucy","studentAge":15}]";
JSonArray jsonArray = JSON.parseArray(JSON_ARRAY_STR);
4. 复杂json格式字符串与JSONObject之间的转换
JSonObject jsonObject = JSON.parseObject(j);
5. json字符串转JAVA对象
User user =



