string与json ,map与json的转换

Map<String, Object> sendDateMap
// map转json对象
String sendDateStr = JSON.toJSONString(sendDateMap);(jsOn格式的)


Map<String, Object> resultMap = new HashMap<String,Object>();
// 定义返回结果
String resultStr = "";
//string转map
resultMap = JsonUtils.parseJson2Map(resultStr);(jsOn格式的)

 

posted on 2018-11-12 19:39  小白菜好吃  阅读(386)  评论(0编辑  收藏  举报

导航