Hacker News new | past | comments | ask | show | jobs | submit login

If you want to use native JSON, store it as an object with a string.

{ "small": 2, "large": { "bignum": "-9223372036854775807.4237482374983253298159" } }

Then make sure to replace or treat the object as a big number. Granted, it is more busywork.




That is fine if the JSON consumer and producer are Javascript. What happens when the producer is a language that handles large numbers correctly? The numbers are rounded in Javascript.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: