▲ | matja 2 days ago | ||||||||||||||||||||||
So a JSON parser that cannot store a 2 is technically compliant? :( | |||||||||||||||||||||||
▲ | reichstein 2 days ago | parent | next [-] | ||||||||||||||||||||||
JSON is a text format. A parser must recognize the text `2` as a valid production of the JSON number grammar. Converting that text to _any_ kind of numerical value is outside the scope of the specification. (At least the JSON.org specification, the RFC tries to say more.) As a textural format, when you use it for data interchange between different platforms, you should ensure that the endpoints agree on the _interpretation_, otherwise they won't see the same data. Again outside of the scope of the JSON specification. | |||||||||||||||||||||||
| |||||||||||||||||||||||
▲ | q3k 2 days ago | parent | prev [-] | ||||||||||||||||||||||
Yep. Or one that parses it into a 7 :) | |||||||||||||||||||||||
|