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
_______________________________________________
Rake-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rake-devel