Details
-
Bug
-
Resolution: Incomplete
-
Minor
-
None
-
2.5.1, 3.0, 3.0.1
-
Security Level: Public
-
None
-
Untriaged
-
Unknown
Description
Brett Lawson and I were reviewing something for encoding for client libraries and in the process we checked what JSON specs consider legal. There's this interesting bit:
http://tools.ietf.org/html/rfc7159#section-2
JSON text is a sequence of tokens. The set of tokens includes six
structural characters, strings, numbers, and three literal names.
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. Implementations that generate only objects or arrays where a
JSON text is called for will be interoperable in the sense that all
implementations will accept these as conforming JSON texts.
This actually means that the numeric values stored by memcached protocol are valid JSON, though the view engine doesn't treat them that way. I believe they're detected as non-JSON at view engine. I'm not sure if this is still the case with 3.0, but I thought I should file this since the revelation that a sequence of digits is valid JSON may trigger some thoughts (or unit tests).