package com.zkjc.common.utils;

import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;

import java.util.Map;

public class JsonMapUtil {
    public static String map2jsonstr(Map<String,?> map){
        String s = new Gson().toJson(map);
        String string = JSONObject.toJSONString(map);
        System.out.println(s);
        System.out.println("string = " + string);
        return string;
    }
    public static Map<String,?> jsonstr2map(String jsonstr){
        return JSONObject.parseObject(jsonstr);
    }
}
