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

Yes, but say in javascript if you do a JSON.parse(), it will give you a double float right?


Yes, because JSON.parse() treats the input as if it were a JS object literal; that is, JSON.parse(JSON.stringify(someObject)) will be idempotent. Usually parser libraries let you construct a parser with options, so you'd make a "let json = JSON({parseNumbersAsBignums: true})" and use that everywhere, but JS doesn't have that built in.




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

Search: