We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当在对象double属性上加上@JSONField(format="#.##") NaN序列化出来不是null
请填写以下信息:
如何操作可以重现该问题:
@Data class Cs { @JSONField(format = "#.##") private double value = Double.NaN; } @Test void test() { Cs s = new Cs(); var tt = JSON.toJSONString(s); System.out.println(tt); }
输出结果
{"value":NaN}
希望输出:
{"value":null}
The text was updated successfully, but these errors were encountered:
fix writeDouble and writeFloat of JSONWriter when value Not a Number …
37756ea
…, for issue alibaba#1562
8876c08
…, for issue #1562
https://github.com/alibaba/fastjson2/releases/edit/2.0.34 问题已修复,请用新版本
Sorry, something went wrong.
No branches or pull requests
问题描述
当在对象double属性上加上@JSONField(format="#.##") NaN序列化出来不是null
环境信息
请填写以下信息:
重现步骤
如何操作可以重现该问题:
输出结果
期待的正确结果
希望输出:
The text was updated successfully, but these errors were encountered: