From: Love U Ruby Date: 2013-07-02T04:42:25+09:00 Subject: Re: Error with JSON#parse The same with `YAML#load` require 'yaml' s = %q!{:value => [ {"a" => nil, "b" => nil, "c" => 0}]}! s # => "{:value => [ {\"a\" => nil, \"b\" => nil, \"c\" => 0}]}" YAML.load(s) # => # ~> /home/kirti/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/psych.rb:205:in `parse': (): did not find expected node content while parsing a flow node at line 1 column 2 (Psych::SyntaxError) # ~> from /home/kirti/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/psych.rb:205:in `parse_stream' # ~> from /home/kirti/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/psych.rb:153:in `parse' # ~> from /home/kirti/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/psych.rb:129:in `load' # ~> from -:5:in `
' -- Posted via http://www.ruby-forum.com/.