Skip to content
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

number too large #15

Closed
louisjiang opened this issue Apr 19, 2022 · 3 comments
Closed

number too large #15

louisjiang opened this issue Apr 19, 2022 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@louisjiang
Copy link

louisjiang commented Apr 19, 2022

com.alibaba.fastjson2.JSONException: number too large : 0.784018486000000000000000000000000000000 at com.alibaba.fastjson2.JSONReader.bigInt(JSONReader.java:1620) at com.alibaba.fastjson2.JSONReaderUTF16.readNumber0(JSONReaderUTF16.java:1527) at com.alibaba.fastjson2.JSONReader.readNumber(JSONReader.java:605) at com.alibaba.fastjson2.reader.ObjectReaderImplMap.readObject(ObjectReaderImplMap.java:380) at com.alibaba.fastjson2.JSON.parseObject(JSON.java:108)

{"a":0.784018486000000000000000000000000000000}

@wenshao
Copy link
Member

wenshao commented Apr 19, 2022

为了防御DOS攻击,目前做了小数位数最长38的限制,这个可以适当改大,你是什么场景,需要这么长的小数位?

@wenshao wenshao added this to the 2.0.2 milestone Apr 19, 2022
@louisjiang
Copy link
Author

区块链的计算,建议加上一个配置。

@wenshao wenshao added the bug Something isn't working label Apr 19, 2022
@wenshao
Copy link
Member

wenshao commented May 2, 2022

https://github.com/alibaba/fastjson2/releases/tag/2.0.2
问题已修复,请使用新版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants