Hacker News new | ask | show | jobs
by meekaaku 783 days ago
Yes, but say in javascript if you do a JSON.parse(), it will give you a double float right?
1 comments

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.