Re: [Json] I-JSON Tpic #2: Top-Level

Nico Williams <> Mon, 28 April 2014 20:36 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id D89A31A6FB7 for <>; Mon, 28 Apr 2014 13:36:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.044
X-Spam-Status: No, score=-1.044 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, IP_NOT_FRIENDLY=0.334] autolearn=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id zOf43eGcv49o for <>; Mon, 28 Apr 2014 13:36:29 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 185A01A064C for <>; Mon, 28 Apr 2014 13:36:29 -0700 (PDT)
Received: from (localhost []) by (Postfix) with ESMTP id 3346227BC069 for <>; Mon, 28 Apr 2014 13:36:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed;; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type:content-transfer-encoding; s=; bh=G9DdcCIm3mBuOuqfB1PP6DuXYjU=; b=K12yXf5q2+L PXRw8UweSI/pGDjjEU/f5I1GDeP1lOFa9TtoL2dDen8X0SGMRcWIl9vMQi1RqLCQ 6hXnry1RA3A0gx2n3ny2mSpBRRtXjlsrWJ1w3ajg6EkBwbyOMMl/ZFiTYEFt/YLJ RwGw4fxITY1A67DyqoeMSRquDqVGfkjU=
Received: from ( []) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: by (Postfix) with ESMTPSA id D98E127BC061 for <>; Mon, 28 Apr 2014 13:36:27 -0700 (PDT)
Received: by with SMTP id x48so6751073wes.7 for <>; Mon, 28 Apr 2014 13:36:26 -0700 (PDT)
MIME-Version: 1.0
X-Received: by with SMTP id nb20mr17043797wic.5.1398717386766; Mon, 28 Apr 2014 13:36:26 -0700 (PDT)
Received: by with HTTP; Mon, 28 Apr 2014 13:36:26 -0700 (PDT)
In-Reply-To: <>
References: <> <>
Date: Mon, 28 Apr 2014 15:36:26 -0500
Message-ID: <>
From: Nico Williams <>
To: Tim Bray <>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: IETF JSON WG <>, Matt Miller <>
Subject: Re: [Json] I-JSON Tpic #2: Top-Level
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 28 Apr 2014 20:36:30 -0000

On Mon, Apr 28, 2014 at 3:20 PM, Tim Bray <> wrote:
> Protocols with messages which are objects are better than other protocols,
> because they are architecturally friendly to MustIgnore policies.
> Allowing top-level JSON to be a primitive - true, null, 42 - is batshit
> crazy for anything the IETF might contemplate, and one of I-JSON’s main
> virtues is ruling that out.

What if the service outputs JSON texts output by a jq program supplied
by the client and applied to server-side data?

> I don’t think top-level arrays are actively harmful at the same level, but
> the MustIgnore is a pretty big value-add, forcing people to sort-of
> future-proof themselves even when they haven’t realized why that’s a good
> idea.

Why can't schema changes be communicated out-of-band?  Apps request
JSON in a particular schema; servers report the schema when the schema
was not requested...

I can see the value in recommending the use of top-level objects in
general, just not in requiring it.

Still, I think if you want to say "so don't use I-JSON", I think
that's mostly fine.  The only problem that comes up is the possibility
that I-JSON would crowd out JSON to the point where non-I-JSON might
not be usable.  I think what I'd want to see there is that JSON
parsers should really just have an option as to this, rather than have
I-JSON parsers that are not also JSON parsers.