-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emoji包含emoji表情的对象转化成json乱码 #49
Comments
和 @ ResponseBody 对等的是 render(200, 字符串对象, ViewType.string); 也就是我们渲染出去的就是原生的字符串。至于从数据库取出的对象如何转化成字符串,则需要你自己想办法解决。 |
恩,应该是被解码了。拿到后能否转义下? |
或者存储前做转义 |
I`ve solved this problem, |
|
DruidDataSourceFactory.java里的“config”方法,里面会获取property |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这个框架最近使用了一下,发现个问题,如题,不知道咋解决,举个例子,该框架从数据库取出带emoji表情字段的对象,使用render转化返回给IOS客户端的时候,数据包乱码,导致IOS无法解析。
public void render(Object result) {
restResponse.originContent(result);
restResponse.write(toJson(result));
throw new RenderFinish();
}
之前使用springMVC的时候用的@responsebody注解是没有问题的,解析成json的动作SpringMVC代替了。也没有很多时间去研究他们的源码。
大神帮帮忙看一下
The text was updated successfully, but these errors were encountered: