Map<String, Object> params = new HashMap<>();
params.put("a","11111");
params.put("b","2222");
System.out.println(params);//{"a":"11111","b":"22222"}
String json = JSON.toJSONString(params);//map转json字符串
map转Json字符串
最新推荐文章于 2024-10-11 18:23:32 发布