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

Nico Williams <nico@cryptonector.com> Wed, 08 May 2019 19:58 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 293731200DE for <json@ietfa.amsl.com>; Wed, 8 May 2019 12:58:48 -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 9RCjPxJti1Oo for <json@ietfa.amsl.com>; Wed, 8 May 2019 12:58:46 -0700 (PDT)
Received: from catfish.maple.relay.mailchannels.net (catfish.maple.relay.mailchannels.net [23.83.214.32]) (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 1AF8012009C for <json@ietf.org>; Wed, 8 May 2019 12:58:45 -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 62DD52C302D; Wed, 8 May 2019 19:58:45 +0000 (UTC)
Received: from pdx1-sub0-mail-a9.g.dreamhost.com (100-96-80-14.trex.outbound.svc.cluster.local [100.96.80.14]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id BE0392C22CF; Wed, 8 May 2019 19:58:44 +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 19:58:45 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|nico@cryptonector.com
X-MailChannels-Auth-Id: dreamhost
X-Arithmetic-Cellar: 215fcaf16410eef3_1557345525231_2242767642
X-MC-Loop-Signature: 1557345525231:4051232021
X-MC-Ingress-Time: 1557345525231
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 76F177FCA2; Wed, 8 May 2019 12:58:39 -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=ZP1uDGnYVUjtTEbMHI+u3g+e13Q=; b=bpsgE/VlyuE zN4yZ6sBS8hsagzDDlkJhEOb/6ilRkgXaeWfH/vyZsOBJIi9Gd5XyxfvIg+Yq2L0 NFrfmIh+hOowYt2W0zzQs+1J+b6oReT2+UNAsDmsQDw6RkLL8aLF9ei/P0nNXI/g M3WT+zzyfukTE/l8Sw7RJA7NYDGBPsI0=
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 8FB577FC9F; Wed, 8 May 2019 12:58:37 -0700 (PDT)
Date: Wed, 08 May 2019 14:58:35 -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: <20190508195834.GW21049@localhost>
References: <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> <20190508183130.GV21049@localhost> <52F0F8D4-277F-4E7E-A5E0-7444C83DEF57@tzi.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <52F0F8D4-277F-4E7E-A5E0-7444C83DEF57@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: gggruggvucftvghtrhhoucdtuddrgeduuddrkeefgddugeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukfhfgggtugfgjggfsehtkeertddtreejnecuhfhrohhmpefpihgtohcuhghilhhlihgrmhhsuceonhhitghosegtrhihphhtohhnvggtthhorhdrtghomheqnecukfhppedvgedrvdekrddutdekrddukeefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehlohgtrghlhhhoshhtpdhinhgvthepvdegrddvkedruddtkedrudekfedprhgvthhurhhnqdhprghthheppfhitghoucghihhllhhirghmshcuoehnihgtohestghrhihpthhonhgvtghtohhrrdgtohhmqedpmhgrihhlfhhrohhmpehnihgtohestghrhihpthhonhgvtghtohhrrdgtohhmpdhnrhgtphhtthhopehnihgtohestghrhihpthhonhgvtghtohhrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/SM_pAj0MhDioJyJt3uq-RZPgpR0>
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 19:58:48 -0000

On Wed, May 08, 2019 at 09:30:36PM +0200, Carsten Bormann wrote:
> Hi Nico,
> 
> > On May 8, 2019, at 20:31, Nico Williams <nico@cryptonector.com> wrote:
> > 
> > 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.)
> 
> Huh?  RFC 8259 is very outspoken here:
> 
>    Numeric values that cannot be represented in the grammar below (such
>    as Infinity and NaN) are not permitted.
> 
> So you have a superset of JSON as your jq input grammar, which is fine
> for me (it just isn’t JSON anymore).  Maybe you mean the sentence in
> the section about Parsers:
> 
>    A JSON parser MAY accept non-JSON forms or extensions.

Yes.

> Yep, non-JSON.  JSON has no extensibility points.

A JSON-like text with 'Infinity' in it is not-JSON.

> > The particular “extension" we're talking about isn't an extension.
> 
> Extending the data model to enable expressing two different kinds of
> numbers, which are identical in numeric value (i.e., JSON semantics),
> but have different semantics in the data model defined by the
> extension (distinguishing integer 3 from floating point 3), definitely
> is an extension.  The fact that only instances are communicated that
> are also valid under (by definition unextended) JSON semantics doesn’t
> change this.

Yes, but note that accepting 'Infinity' doesn't cause an
interoperability problem, while rejecting '3.0' does.

Nico
--