package com.gz.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.util.Map;

/**
 * @author LiuchangLan
 * @date 2021/3/9 19:14
 */
public class ObjectUtils {

    public static Map<String,Object> objToMap(Object obj){
        String json = JSON.toJSONString(obj);
        Map map = JSONObject.parseObject(json, Map.class);
        return map;
    }
}
