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

Support for "raw" (ASCII or BCD) numbers #3

Open
snej opened this issue Nov 17, 2015 · 0 comments
Open

Support for "raw" (ASCII or BCD) numbers #3

snej opened this issue Nov 17, 2015 · 0 comments

Comments

@snej
Copy link
Contributor

snej commented Nov 17, 2015

Some applications require either huge numbers, or perfectly lossless decimal numbers (e.g. banking). 64-bit floating point doesn't work for these because it loses precision as numbers grow, and it can't represent negative powers of ten precisely.

The workaround in JSON is to store the number as a string containing an ASCII decimal representation. It would be useful to have a data type for this, so it could be recognized by all clients as a number. Accessing it as an int or double would be best-effort, accessing it as a string would return the exact string given.

callumbirks added a commit that referenced this issue Jan 4, 2024
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

No branches or pull requests

1 participant