4 ms·
JSON defines absolutely no semantics for numbers, only the syntax. Some implementations do handle 0 and 0.0 differently. See also: the problems with stuffing
by tomjakubowski 3y ago
JSON defines absolutely no semantics for numbers, only the syntax. Some implementations do handle 0 and 0.0 differently.
See also: the problems with stuffing a high magnitude integer like 2^60+7 into a JSON document, and then unpacking it in JS using the standard web browser API. The number can't be represented exactly with the standard JS number type, but it's a valid JSON document, and so the implementation has to make a choice.