-
Notifications
You must be signed in to change notification settings - Fork 510
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
[BUG] 使用WriteClassName序列化,然后再反序列化时@type信息没有去除 #2623
Comments
可以通过开启SupportAutoType避免反序列化后携带@type字段
|
2.0.x如果不配置SupportAutoType,就不会做任何相关处理,这个是为了安全考虑。 |
好的,请问开启SupportAutoType这个功能是在哪一个版本添加上去的,我使用fastjson2.0.13版本加上SupportAutoType后@type仍然没有去除 |
另外我发现一个问题,如果序列化对象是java.sql.Date时,使用上述接口会报错
报错日志如下 |
问题描述
使用序列化方法JSON.toJSONString(dataMap, SerializerFeature.WriteClassName),反序列话后的对象中包含@type信息,理想情况下应该不会出现@type(fastjson1反序列化后没有@type)
环境信息
重现步骤
期待的正确结果
期望的输出结果(使用fastjson1.2.68)
相关日志输出
The text was updated successfully, but these errors were encountered: