-
Notifications
You must be signed in to change notification settings - Fork 64
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
parse_json - differs parsing floats #755
Comments
Hmm, interesting. I know floats have issues with representing certain numbers, but this doesn't appear to be the case for the specific example given: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=3d538d9f2ae192da51693bc12fdcfbfa I believe we just defer to serde_json for deserialization, though, so I'm not sure why it is not preserving the precision. |
I jumped on this after seeing that it is in fact solvable through a feature in serde_json. |
Hey dear VRL-folks 👋
I hope this is not a double posting, I only found issues regards
parse_json
for large ints, I'm having an issues as well for floats.We're getting a JSON which contains the field
ts
and has in our test case the value1626175065.5934923
after passing it to
parse_json
the object has the value of1626175065.5934925
, the last digit differs by 2.I know, floats are hard & annoying, but is there some way to avoid/fix it?
The text was updated successfully, but these errors were encountered: