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

Nico Williams <nico@cryptonector.com> Mon, 28 April 2014 21:28 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B60A51A802C for <json@ietfa.amsl.com>; Mon, 28 Apr 2014 14:28:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.044
X-Spam-Level:
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 mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JOyzlxaro4c8 for <json@ietfa.amsl.com>; Mon, 28 Apr 2014 14:28:44 -0700 (PDT)
Received: from homiemail-a109.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id 262B01A797C for <json@ietf.org>; Mon, 28 Apr 2014 14:28:44 -0700 (PDT)
Received: from homiemail-a109.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a109.g.dreamhost.com (Postfix) with ESMTP id 769482007DA12 for <json@ietf.org>; Mon, 28 Apr 2014 14:28:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type:content-transfer-encoding; s= cryptonector.com; bh=eSWe7QJKn6Xw+9IDDVdgdfV8FoY=; b=ryGl/KWGfnd Oy7S7uyAsTrL4illX9j+58HB8zqKUFyK46dQjSY2VspvTlYRpchiVXPe4zvzGtih z1kSycDVBZMmn5Dzerg3o4//KNgUbVHbAtsbtRaYPhoJp1NvWuWu4f9R+KMF75R0 wEM4rwf8dTjX/w/C3cDts0o2UyXoBCKE=
Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a109.g.dreamhost.com (Postfix) with ESMTPSA id 2C2E82005D824 for <json@ietf.org>; Mon, 28 Apr 2014 14:28:42 -0700 (PDT)
Received: by mail-we0-f177.google.com with SMTP id t60so5109081wes.22 for <json@ietf.org>; Mon, 28 Apr 2014 14:28:41 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.180.105.132 with SMTP id gm4mr17183333wib.39.1398720521856; Mon, 28 Apr 2014 14:28:41 -0700 (PDT)
Received: by 10.216.29.200 with HTTP; Mon, 28 Apr 2014 14:28:41 -0700 (PDT)
In-Reply-To: <CAHBU6itZx4zeZXKNHOu+NE52kfnnJ2fPZ6MmAc7OCvdvig_k3g@mail.gmail.com>
References: <535EB119.4000908@cisco.com> <CAHBU6itycQmqzAuxWyrFZ_v=fHdenm2csyAqtUGGu+vteh6=yQ@mail.gmail.com> <CAK3OfOjeaMLKMgNgJE7Cbr-LW1R5HMWBp3MFZREsZUbeMwwHNA@mail.gmail.com> <CAO1wJ5SZrrDcj6DvQwdwYF+ivFiftmXuvdZd-SmuUiFEvdcr4g@mail.gmail.com> <CAHBU6itZx4zeZXKNHOu+NE52kfnnJ2fPZ6MmAc7OCvdvig_k3g@mail.gmail.com>
Date: Mon, 28 Apr 2014 16:28:41 -0500
Message-ID: <CAK3OfOj3eZerommqt9mNJ=-HY1X=Qp_N=NBCtxhoZX1HcspdkA@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: Tim Bray <tbray@textuality.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/json/kBLxr4R_6bAVuskFveRrCrYoRZU
Cc: Matt Miller <mamille2@cisco.com>, Jacob Davies <jacob@well.com>, IETF JSON WG <json@ietf.org>
Subject: Re: [Json] I-JSON Tpic #2: Top-Level
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 28 Apr 2014 21:28:44 -0000

On Mon, Apr 28, 2014 at 4:16 PM, Tim Bray <tbray@textuality.com> 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
wild.

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).

Nico
--