From: Love U Ruby Date: 2013-07-02T04:39:11+09:00 Subject: Error with JSON#parse require 'json' s = %q!{:value => [ {"a" => nil, "b" => nil, "c" => 0}]}! s # => "{:value => [ {\"a\" => nil, \"b\" => nil, \"c\" => 0}]}" JSON.parse(s) # => # ~> from -:5:in `
' # ~> /home/kirti/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/json/common.rb:155:in `parse': 757: unexpected token at '{:value => [ {"a" => nil, "b" => nil, "c" => 0}]}' (JSON::ParserError) # ~> from /home/kirti/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/json/common.rb:155:in `parse' # ~> from -:5:in `
' I have expected - `{:value => [ {"a" => nil, "b" => nil, "c" => 0}]}` What the wrong I did here ? -- Posted via http://www.ruby-forum.com/.