common
common copied to clipboard
微信用户的昵称中有特殊字符时,获取用户信息出错
接口: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) ;