Skip to content

Instantly share code, notes, and snippets.

@uu59
Created July 15, 2016 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uu59/6954a74ecff8dc7ad048013badfdcb3d to your computer and use it in GitHub Desktop.
Save uu59/6954a74ecff8dc7ad048013badfdcb3d to your computer and use it in GitHub Desktop.
$ 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