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

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.




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

Search: