Gson 禁止特殊字符转码
Map<String,String> map = new HashMap<String,String>(); map.put("url", "&response_type=code&scope=snsapi_base&state=2#wechat_redirect"); Gson gson = new GsonBuilder().disableHtmlEscaping().create(); System.out.println(gson.toJson(map));