this post was submitted on 30 Jun 2024
560 points (98.1% liked)
Programmer Humor
19512 readers
324 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
json doesn't have ints, it has Numbers, which are ieee754 floats. if you want to precisely store the full range of a 64 bit int (anything larger than 2^53 -1) then string is indeed the correct type
No. numbers in JSON have arbitrary precision. The standard only specifies that implementations may impose restrictions on the allowed values.
https://www.rfc-editor.org/rfc/rfc8259.html#section-6
Let me show you what Ethan has to say about this: https://feddit.org/post/319546/174361