Actions
Bug #14054
closedJson parser bug
Bug #14054:
Json parser bug
Description
Hello,
When i do:
JSON.parse("true") # => JSON::ParserError: 784: unexpected token at 'true'
true.to_json # => "true"
The "true" or even "false" are valid according to the JSON standard (https://tools.ietf.org/html/rfc7159):
WDYT about this ?
Cheers,
Sébastien
Updated by shyouhei (Shyouhei Urabe) about 8 years ago
- Status changed from Open to Rejected
It's just because your copy of json gem is too old.
[1] pry(main)> require 'json'
=> true
[2] pry(main)> JSON::VERSION
=> "2.1.0"
[3] pry(main)> JSON.parse("true")
=> true
[4] pry(main)>
Actions