Project

General

Profile

Actions

Bug #10143

closed

JSON module does not conform to RFC 7159

Added by chibimagic (Chibi Magic) almost 8 years ago. Updated over 7 years ago.

Status:
Third Party's Issue
Priority:
Normal
Target version:
ruby -v:
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
[ruby-core:64406]

Description

From RFC 7159: http://tools.ietf.org/html/rfc7159

   A JSON text is a serialized value.  Note that certain previous
   specifications of JSON constrained a JSON text to be an object or an
   array.

This means that the following should be valid:
JSON.parse('1') JSON.parse('this is a string')
However, they each currently return a JSON::ParserError:
A JSON text must at least contain two octets!
or
757: unexpected token at 'this is a string'

Actions

Also available in: Atom PDF