Open iRonin opened 9 years ago
I don't think the concept of a maximum numeric value exists in JSON itself. It would be possible to check against some settable limit in the gem, but then do what? Shouldn't javascript promote too large integers to floats anyway?
I have exact same problem. I've tried to solve it by overriding Bignum#to_json
method with no luck #254 . The idea was to convert large integers (53+ bits) to string.
We have an issue with integer values served by our Rails API and consumed by EmberJS app. They are stored in the DB as bigint and they exceed the maximum numeric value in JavaScript. Isn't it something that should be handled by this gem?