Created
April 4, 2012 19:35
-
-
Save danhodos/2304972 to your computer and use it in GitHub Desktop.
This file contains 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
1.9.3p0 :073 > json | |
=> "[{\"hello\":\"2011-01-01 00:00:00.0\"}]" | |
1.9.3p0 :074 > JSON.load(json) | |
=> [{"hello"=>"2011-01-01 00:00:00.0"}] | |
1.9.3p0 :075 > | |
1.9.3p0 :076 > Crack::JSON.parse(json) | |
Psych::SyntaxError: (<unknown>): couldn't parse YAML at line 0 column 25 | |
from /Users/dan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych.rb:154:in `parse' | |
from /Users/dan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych.rb:154:in `parse_stream' | |
from /Users/dan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych.rb:125:in `parse' | |
from /Users/dan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych.rb:112:in `load' | |
from /Users/dan/.rvm/gems/ruby-1.9.3-p0@groupon_affiliates/gems/crack-0.3.1/lib/crack/json.rb:12:in `parse' | |
from (irb):76 | |
from /Users/dan/.rvm/gems/ruby-1.9.3-p0@groupon_affiliates/gems/railties-3.2.2/lib/rails/commands/console.rb:47:in `start' | |
from /Users/dan/.rvm/gems/ruby-1.9.3-p0@groupon_affiliates/gems/railties-3.2.2/lib/rails/commands/console.rb:8:in `start' | |
from /Users/dan/.rvm/gems/ruby-1.9.3-p0@groupon_affiliates/gems/railties-3.2.2/lib/rails/commands.rb:41:in `<top (required)>' | |
from ./script/rails:6:in `require' | |
from ./script/rails:6:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment