fastjson
常用工具类
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class CommonUtil {
// Object转成String
Object obj = new Object();
String jsonString = JSONObject.toJSonString(obj);
String jsonString1 = JSON.toJSonString(obj);
public static Map object2Map(Object obj) {
return JSONObject.parseObject(JSONObject.toJSonString(obj), new TypeReference
评论列表(0条)