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
Some double values trigger trailing zeros when deserialized.
"field": 1.2932 (of type Double)
Is parsed as 1.2932000000000001
If you change the field to type Float then the value is correctly parsed.
Again only certain numbers appear to be triggering this.
You can replicate the issue like this.
Define:
class Obj { Double field; }
Then execute:
String json = "{ \"field\" : 1.2932}"; Obj obj = JsonIterator.deserialize(json,Obj.class); System.out.println(obj.getField()); // 1.2932000000000001
Same issue arises even if you use the Any api.
Any
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Some double values trigger trailing zeros when deserialized.
Is parsed as 1.2932000000000001
If you change the field to type Float then the value is correctly parsed.
Again only certain numbers appear to be triggering this.
You can replicate the issue like this.
Define:
Then execute:
Same issue arises even if you use the
Any
api.The text was updated successfully, but these errors were encountered: