//对象转jsonpublic static String obj2Json(Object obj) { String jsonStr = JSON.toJSONString(obj); return jsonStr;}//json转对象public staticT json2Obj(String json,Class target) { return JSON.parseObject(json, target);}/** * 对象转另外一个对象,VO转PO * return * Author luosc * param * Date 2019-03-27 14:46 */public static T objectCopyParams(Object obj, Class target) { String jsonStr = JSON.toJSONString(obj); return JSON.parseObject(jsonStr, target);}