common icon indicating copy to clipboard operation
common copied to clipboard

微信用户的昵称中有特殊字符时,获取用户信息出错

Open hrwhat opened this issue 6 years ago • 0 comments

接口:WxUtil.getWechat().user().getUser(openId)
错误信息: me.hao0.common.exception.JsonException: com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 20)): has to be escaped using backslash to be included in string value 需要在 me.hao0.common.json.Jsons 工具类中设置 mapper.configure(Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true) ;

hrwhat avatar Jun 05 '19 09:06 hrwhat