3 ms·
JSON numbers are arbitrary precision, because the spec doesn't limit the precision in any way.
by stkdump 5y ago
JSON numbers are arbitrary precision, because the spec doesn't limit the precision in any way.
- weinzierl 5y agoYou are right, but as theamk pointed out in another comment, the spec does tell you to "expect no more precision or range than" IEEE754 doubles. So, don't count on arbitrary precision... [1] https://datatracker.ietf.org/doc/html/rfc7159#section-6 https://datatracker.ietf.org/doc/html/rfc7159#section-6