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

Nico Williams <> Mon, 28 April 2014 21:28 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id B60A51A802C for <>; Mon, 28 Apr 2014 14:28:44 -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 JOyzlxaro4c8 for <>; Mon, 28 Apr 2014 14:28:44 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 262B01A797C for <>; Mon, 28 Apr 2014 14:28:44 -0700 (PDT)
Received: from (localhost []) by (Postfix) with ESMTP id 769482007DA12 for <>; Mon, 28 Apr 2014 14:28:43 -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=eSWe7QJKn6Xw+9IDDVdgdfV8FoY=; b=ryGl/KWGfnd Oy7S7uyAsTrL4illX9j+58HB8zqKUFyK46dQjSY2VspvTlYRpchiVXPe4zvzGtih z1kSycDVBZMmn5Dzerg3o4//KNgUbVHbAtsbtRaYPhoJp1NvWuWu4f9R+KMF75R0 wEM4rwf8dTjX/w/C3cDts0o2UyXoBCKE=
Received: from ( []) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: by (Postfix) with ESMTPSA id 2C2E82005D824 for <>; Mon, 28 Apr 2014 14:28:42 -0700 (PDT)
Received: by with SMTP id t60so5109081wes.22 for <>; Mon, 28 Apr 2014 14:28:41 -0700 (PDT)
MIME-Version: 1.0
X-Received: by with SMTP id gm4mr17183333wib.39.1398720521856; Mon, 28 Apr 2014 14:28:41 -0700 (PDT)
Received: by with HTTP; Mon, 28 Apr 2014 14:28:41 -0700 (PDT)
In-Reply-To: <>
References: <> <> <> <> <>
Date: Mon, 28 Apr 2014 16:28:41 -0500
Message-ID: <>
From: Nico Williams <>
To: Tim Bray <>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: Matt Miller <>, Jacob Davies <>, IETF JSON WG <>
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 21:28:44 -0000

On Mon, Apr 28, 2014 at 4:16 PM, Tim Bray <> wrote:
> RFC 7159 already says that for interoperability, top level objects should be
> objects or arrays.  At the simplest level, if all I-JSON does is forbid all
> the things that 7159 calls out as interoperability problems, that would be
> good enough for me.  The notion that i-json would *weaken* 7159’s
> requirements by allowing a top level object to consist of just true or
> "true" seems outlandish to me.

That was a hard-won but-grudging concession to reality.  All encoders
and parser I checked have long had an option to permit scalars at the
top-level; RFC7159 should have required that by default scalars be
accepted at the top-level given that such things are found in the

I don't really care to re-argue that -- grudging or not, the
concession was all that mattered.  But if we're going to argue about
what I-JSON should do about the top-level based on the fact that the
concession in RFC7159 was grudging, then I guess we'll have to
re-argue this!

But I'd rather focus on why one might want to mandate objects at the
top-level, what to do when one has an array (use text sequences?!),
and what to do when this isn't appropriate ("don't use I-JSON" being
fine, provided we don't end up squeezing out non-I JSON).