JSON vs IETF JSON

JSON and IETF JSON feel different in spirit in some important ways to me.

For example, numbers.

JSON doesn't seem to put constraints on numbers. JSON also doesn't seem to suggest that decoding numbers in a lossy way is acceptable

IETF JSON suggests a constraint and even a lossy-ness on numbers that has been included some JSON implementations

I would have preferred that the paragraph in the screen-shot, from the latest IETF RFC, did not exist in there

This specification allows implementations to set limits on the range and precision of numbers accepted.  Since software that implements IEEE 754 binary64 (double precision) numbers [IEEE754] is generally available and widely used, good interoperability can be achieved by implementations that expect no more precision or range than these provide, in the sense that implementations will approximate JSON numbers within the expected precision.  A JSON number such as 1E400 or 3.141592653589793238462643383279 may indicate potential interoperability problems, since it suggests that the software that created it expects receiving software to have greater capabilities for numeric magnitude and precision than is widely available.
0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.social/users/reiver/statuses/115956356584464586 on your instance and quote it. (Note that quoting is not supported in Mastodon.)