Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

JSON parsing treats non-quoted numerals as a Number. That alone can result in some truncation.


Though, in JSON, anything that isn't a number should be quoted?


If the JSON writer is writing according to spec


I don't understand how this is at all a similar issue. If you want a string in JSON, then you must quote it.

https://www.json.org/json-en.html


And if you want a string in Excel you must apostrophe-prefix it. If you think “serial number” == number, telephone number == number, then try to use the number handling, you get problems because “numbers” don’t have leading zeros or spaces or parens or hashes or plus symbols.


I would like to store, then retrieve exactly 1234567890123456789 apples instead of 1.070816993713379 × 2⁶⁰ = 1234567939550609408. Unfortunately due to IEEE-754 conversions I can only do this up to 7-8 digits or so. This is a number, just not one that can be represented as a Number without loss of precision towards the end.


that's more apples than we can fit on the planet. For such special tasks I would think it's ok to need special tools




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: