Map<String,Object> map = Maps.newHashMap(); map.put("id",1); map.put("name","张三"); log.info("map.toString()的结果为:{}",map.toString()); log.info("JSON.toJSONString(map)的结果为:{}",JSON.toJSONString(map));
结果为:
Map<String,Object> map = Maps.newHashMap(); map.put("id",1); map.put("name","张三"); log.info("map.toString()的结果为:{}",map.toString()); log.info("JSON.toJSONString(map)的结果为:{}",JSON.toJSONString(map));
结果为: