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? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
JavaBean转Json时,当JavaBean中Long型的值在[-1,1038]时,使用JSONWriter.Feature.WriteLongAsString会失效。
如何操作可以重现该问题:
User user1 = new User(1038L); String res1 = JSON.toJSONString(user1, JSONWriter.Feature.WriteLongAsString); System.out.println(res1); // {"id":1038} User user2 = new User(1039L); String res2 = JSON.toJSONString(user2, JSONWriter.Feature.WriteLongAsString); System.out.println(res2); // {"id":"1039"}
{"id":"1038"}
{"id":1038} {"id":"1039"}
The text was updated successfully, but these errors were encountered:
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.20-SNAPSHOT/ 问题已修复,请帮忙用2.0.20-SNAPSHOT版本帮忙验证
Sorry, something went wrong.
bug fix for WriteLongAsString, for issue #961
4bbdbef
No branches or pull requests
问题描述
JavaBean转Json时,当JavaBean中Long型的值在[-1,1038]时,使用JSONWriter.Feature.WriteLongAsString会失效。
环境信息
重现步骤
如何操作可以重现该问题:
期待的正确结果
{"id":"1038"}
相关日志输出
{"id":1038}
{"id":"1039"}
The text was updated successfully, but these errors were encountered: