From: Torsten Robitzki Date: 2012-07-19T17:57:04+09:00 Subject: JSON.parse string Hello, I just stumbled over the fact, that the JSON parser from ruby 1.9.2 allows only arrays and objects: a = JSON.parse '"fooo"' JSON::ParserError: 710: unexpected token at '"fooo"' a = JSON.parse "[\"a\"]" => ["a"] As a workaround, I can wrap every text into an array and take the first element of the result: JSON.parse( "[#{a}]" )[ 0 ] But I wonder if this is the intended behavior and if so, why? Kind regards Torsten -- Posted via http://www.ruby-forum.com/.