There seems to be no special method, maybe I
There seems to be no special method, maybe I am not very talented,
The two methods I know:
map means that key-value pairs exist, so the types are It is fixed. We can apply for another map
String replacement, add double quotes using regular expressions: public?void?testJson() {
Map
map.put("aaa",?111);< /p>
String?json?=?JSON.toJSONString(map);
String?json1?=?json.replaceAll(":",?":\"");
p>json1?=?json1.replaceAll("}",?"\"}");
System.out.println(json);
System. out.println(json1);
}