On 7/24/14, 1:58 PM, Justin Whear wrote:
On Thu, 24 Jul 2014 13:49:27 -0300, Ary Borenszweig wrote:

Nope, a JSON can only be an array or an object (hash).

Ary, can you point out the place in the spec where this is specified?
Not to be pedantic, but the spec only seems to define a "JSON value", not
a "JSON document".


You are right, my bad. According to Wikipedia (which has links to RFCs):

Early versions of JSON (such as specified by RFC 4627) required that a valid JSON "document" must consist of only an object or an array type—though they could contain other types within them. This restriction was relaxed starting with RFC 7158, so that a JSON document may consist entirely of any possible JSON typed value.

Reply via email to