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

Json floats #53

Merged
merged 2 commits into from
Dec 11, 2020
Merged

Json floats #53

merged 2 commits into from
Dec 11, 2020

Conversation

warpfork
Copy link
Member

Some fixes to JSON floats, which had previously been nearly unsupported by this library.

  • Parsing JSON will no longer parse really large numbers (e.g., >64bit) as floats unless they have some clear indication of not being an integer (decimal point, exponent, etc).

  • Emitting floats is actually supported. Previously this panicked.

This really does not jive well with our mental model of tokens which
are agnostic to particular serial format.  And the idea of potentially
*silently* losing precision of a number when processed in this way
seems rather alarming to me, even if it is considered (to some extent?)
"normal" for json to do so.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant