Re: [Json] Adding integers to JSON (Re: JSON Schema Language)

Nico Williams <nico@cryptonector.com> Wed, 08 May 2019 18:31 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3A3061201D0 for <json@ietfa.amsl.com>; Wed, 8 May 2019 11:31:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cryptonector.com
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 21nfBOyPs9Zf for <json@ietfa.amsl.com>; Wed, 8 May 2019 11:31:47 -0700 (PDT)
Received: from goldenrod.birch.relay.mailchannels.net (goldenrod.birch.relay.mailchannels.net [23.83.209.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 705E712013C for <json@ietf.org>; Wed, 8 May 2019 11:31:47 -0700 (PDT)
X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com
Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id AB2EA2104A; Wed, 8 May 2019 18:31:46 +0000 (UTC)
Received: from pdx1-sub0-mail-a9.g.dreamhost.com (100-96-30-10.trex.outbound.svc.cluster.local [100.96.30.10]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id F02F42252C; Wed, 8 May 2019 18:31:40 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com
Received: from pdx1-sub0-mail-a9.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Wed, 08 May 2019 18:31:46 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|nico@cryptonector.com
X-MailChannels-Auth-Id: dreamhost
X-Army-Army: 07b5c4152c878725_1557340306434_1092658021
X-MC-Loop-Signature: 1557340306434:2462942237
X-MC-Ingress-Time: 1557340306434
Received: from pdx1-sub0-mail-a9.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a9.g.dreamhost.com (Postfix) with ESMTP id 8DC8C7FCA0; Wed, 8 May 2019 11:31:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to:content-transfer-encoding; s= cryptonector.com; bh=MTwubr71ola6EHjrWH/fvxVuZTA=; b=cgrIFDrtHxc q6ZJ51RIxnke6s6GZFaewjTPTwOdGvBrdF/Ks9XMJxVyH4A/1fQlOVKYDOWuxnBl tAOWnGaIqlli1BNTb/vfJ/KXfk4ACb/8YJf9q/v5n/6GHqYu4sIBu68BL8c0KRJ1 sov/NbhsvreMv8HuTf2iioBNzeSiiG9k=
Received: from localhost (unknown [24.28.108.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by pdx1-sub0-mail-a9.g.dreamhost.com (Postfix) with ESMTPSA id 869537FC9E; Wed, 8 May 2019 11:31:33 -0700 (PDT)
Date: Wed, 08 May 2019 13:31:31 -0500
X-DH-BACKEND: pdx1-sub0-mail-a9
From: Nico Williams <nico@cryptonector.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: JSON WG <json@ietf.org>
Message-ID: <20190508183130.GV21049@localhost>
References: <20190507154201.GP21049@localhost> <CEF72901-5077-4305-BA68-60624DCE952D@bzfx.net> <69ea0c99-e983-5972-c0aa-824ddeecb7c4@dret.net> <CAMm+LwjyVjnJuWE4+a9Ea=_X1uuEGuK+O4KojzN3uVQ+s+HqUQ@mail.gmail.com> <058f58a3-dd27-998e-5f54-4874aff5f2f0@dret.net> <20190507221726.GR21049@localhost> <CAJK=1Rj7PBD-bbwvsqgjQQzp4Aoidb-W2q5Lj6asMHHDHaTVYQ@mail.gmail.com> <702ee54b-9465-7ca8-b521-2a88c1a47785@gmail.com> <20190508160740.GU21049@localhost> <ACD9A0A2-A75E-4B6E-9E9B-165DC222781B@tzi.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <ACD9A0A2-A75E-4B6E-9E9B-165DC222781B@tzi.org>
User-Agent: Mutt/1.9.4 (2018-02-28)
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrkeefgdduvdeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukfhfgggtugfgjggfsehtkeertddtreejnecuhfhrohhmpefpihgtohcuhghilhhlihgrmhhsuceonhhitghosegtrhihphhtohhnvggtthhorhdrtghomheqnecukfhppedvgedrvdekrddutdekrddukeefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehlohgtrghlhhhoshhtpdhinhgvthepvdegrddvkedruddtkedrudekfedprhgvthhurhhnqdhprghthheppfhitghoucghihhllhhirghmshcuoehnihgtohestghrhihpthhonhgvtghtohhrrdgtohhmqedpmhgrihhlfhhrohhmpehnihgtohestghrhihpthhonhgvtghtohhrrdgtohhmpdhnrhgtphhtthhopehnihgtohestghrhihpthhonhgvtghtohhrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/euymMYaXfwYp2oobKzpPlhyS5eM>
Subject: Re: [Json] Adding integers to JSON (Re: JSON Schema Language)
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
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: <https://mailarchive.ietf.org/arch/browse/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: Wed, 08 May 2019 18:31:49 -0000

On Wed, May 08, 2019 at 06:59:54PM +0200, Carsten Bormann wrote:
> On May 8, 2019, at 18:07, Nico Williams <nico@cryptonector.com> wrote:
> > That's an interop bug.  They should fix it.
> 
> It also nicely demonstrates the law of inevitable extensibility.
> 
> JSON was designed not to provide extensibility.  Ever.
> Radical, but a well motivated idea at the time.

The spec allows extensions, actually, but indeed, it doesn't provide for
extensibility.

(For example, jq will parse Inf and Infinity, but it will not output
such words, nor will it output NaN.)

> The law of inevitable extensibility says:
> 
> # If you don’t provide an extension point, somebody will.
> # They will shove their extension into any crevice available.
> # (And your up to now rock-solid design breaks.)

The particular "extension" we're talking about isn't an extension.

> The crevice here was that there are many ways to express the number 3:
> 3, 3.0, 3e0, 0.03e2, 300e-2 etc.  We can give some of these
> expressions different semantics than the other.  Voila.  Extensibility
> achieved.  Brittleness added.

If anything one would expect this to bring up canonicalization...
(oh no, I've mentioned that.  please no one take that as a serious
invitation to discuss canonical JSON!)

> I have seen the law of inevitable extensibility applied to:
> 
> — duplicate map keys for adding comments to JSON.  Some people believe:
> 
>   { “postcode”: “This is a comment about the post code 4711”,
>     “postcode”: 4711 }
> 
>   is a valid way to extend JSON with comments.  (Because their
>   implementation happens to ignore map keys that are invalidly used
>   again later, which is not a given.)

Yes.

> - unnecessary escaping for ascribing some special semantics.  Say, if
> a string starts with “\u0073” and not with the equivalent “s”, this is
> supposed to mean the string has some different semantics (e.g., the
> rest is a base64url encoded byte string as opposed to what would
> normally be a text string, or a type tag, or…).

Oof.

> — millions of ways of interpreting whitespace or the lack thereof.
> I’ve lost count.

Play stupid games...

> I do not think any longer that anything that is meant to see
> significant usage can be designed without designing in extensibility
> points from the start.  At least if it is supposed to last.

Maybe.

Nico
--