by yonatank · 7y ago · 0 comments
echo 1152921504606846976 | jq
1152921504606847000See https://www.ecma-international.org/ecma-262/6.0/#sec-ecmascr...
https://brendaneich.com/wp-content/uploads/2017/12/dotJS-201... et seq.
Here's the epic jwz rant on it: https://www.jwz.org/blog/2010/10/every-day-i-learn-something...
with Brendan Eich chiming in: https://www.jwz.org/blog/2010/10/every-day-i-learn-something...
>JSON is agnostic about the semantics of numbers ... JSON instead offers only the representation of numbers that humans use: a sequence of digits.
So... anything is valid, per the spec.
> echo 1152921504606846976 | python -c 'import sys, json; print(json.load(sys.stdin))'
1152921504606846976