会出现\的写法:
// 参数集合
Map<String,String> headerMap = new HashMap<String, String>();
headerMap.put("key1","key1");
headerMap.put("key2","key2");
// 此时如果直接用下面的方法就会出现"\
JSONValue.toJSONString(headerMap);
更正后的写法:
// 参数集合
JSONObject jsonObject = new JSONObject();
jsonObject .put("key1","key1");
jsonObject .put("key2","key2");
// 下面的方法不会出现"\
JSON.toJSONString(jsonObject);