Created
September 21, 2011 14:08
-
-
Save andrewschaaf/1232117 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
Ah, Ruby community... | |
Y U no like rigorous implementation like the Python community? | |
ruby-1.9.2-head :001 > require 'multi_json' | |
=> true | |
ruby-1.9.2-head :002 > MultiJson.decode "{}" | |
=> {} | |
ruby-1.9.2-head :003 > MultiJson.decode "1" | |
MultiJson::DecodeError: A JSON text must at least contain two octets! | |
from /Users/a/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/json/common.rb:146:in `initialize' | |
from /Users/a/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/json/common.rb:146:in `new' | |
from /Users/a/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/json/common.rb:146:in `parse' | |
from /Users/a/.rvm/gems/ruby-1.9.2-head/gems/multi_json-1.0.3/lib/multi_json/engines/json_gem.rb:13:in `decode' | |
from /Users/a/.rvm/gems/ruby-1.9.2-head/gems/multi_json-1.0.3/lib/multi_json.rb:65:in `decode' | |
from (irb):3 | |
from /Users/a/.rvm/rubies/ruby-1.9.2-head/bin/irb:16:in `<main>' | |
ruby-1.9.2-head :004 > |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment