oj: OJ 3.10.7 breaks existing float parsing in JSON.parse compared to 3.10.6
I’m assuming it’s actually a bug to change the parsing behaviour in a patch release like this. I’m loading OJ just by doing Oj.optimize_rails()
In 3.10.6
JSON.parse('{"id": 20.0000000000000000000000}')
=> {"id"=>20.0}
In 3.10.7
JSON.parse('{"id": 20.0000000000000000000000}')
=> {"id"=>0.0037294240988460484}
In both cases, it’s a Float. It’s not clear to me how to revert to the previous behaviour if at all possible, so we’ve pinned it to 3.10.6 now.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 26 (13 by maintainers)
Yes, we can close this. Thanks for your help.