Created
July 15, 2016 06:29
-
-
Save uu59/6954a74ecff8dc7ad048013badfdcb3d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pry -r json -r oj -r yajl | |
[1] pry(main)> json = "[0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100e100]" | |
=> "[0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100e100]" | |
[2] pry(main)> JSON.parse json | |
=> [0.0] | |
[3] pry(main)> Yajl.load json | |
=> [100.0] | |
[4] pry(main)> Oj.load json | |
=> [#<BigDecimal:7faa1e380c00,'0.1E3',9(117)>] | |
[5] pry(main)> RUBY_DESCRIPTION | |
=> "ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment