[Json] Sticking to the past -- Re: [Technical Errata Reported] RFC8259 (6208)

Carsten Bormann <cabo@tzi.org> Wed, 10 June 2020 15:00 UTC

Return-Path: <cabo@tzi.org>
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 18BD73A094E for <json@ietfa.amsl.com>; Wed, 10 Jun 2020 08:00:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=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 g5WCGUioF5nJ for <json@ietfa.amsl.com>; Wed, 10 Jun 2020 08:00:13 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CF6813A08C6 for <json@ietf.org>; Wed, 10 Jun 2020 08:00:06 -0700 (PDT)
Received: from [172.16.42.112] (p5089ae91.dip0.t-ipconnect.de [80.137.174.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 49hqsb3mqDzyS4; Wed, 10 Jun 2020 17:00:03 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <CAOeq1c_SW1WwHZPMwunWPh3W53vCZThvEUuhb5Y1_NnbT6s=ng@mail.gmail.com>
Date: Wed, 10 Jun 2020 17:00:03 +0200
Cc: json@ietf.org, superuser@gmail.com, tbray@textuality.com, barryleiba@computer.org, linuxwolf+ietf@outer-planes.net, RFC Errata System <rfc-editor@rfc-editor.org>
X-Mao-Original-Outgoing-Id: 613494003.0700999-21a8823c413b7a0c1a9fb88e72eee235
Content-Transfer-Encoding: quoted-printable
Message-Id: <E32E7606-1330-4FB2-B109-D6CB4869AB8C@tzi.org>
References: <20200610133258.D4B85F4073D@rfc-editor.org> <19B4CC94-8752-46AF-95A2-6BB25E480A24@tzi.org> <CAOeq1c_SW1WwHZPMwunWPh3W53vCZThvEUuhb5Y1_NnbT6s=ng@mail.gmail.com>
To: David Golden <xdg@xdg.me>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/xj9FnQGrje6c-tyaFxveSpCr_eA>
Subject: [Json] Sticking to the past -- Re: [Technical Errata Reported] RFC8259 (6208)
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, 10 Jun 2020 15:00:26 -0000

Hi David,

In the spirit of Barry’s point that this is no longer about the Errata Report, I’m changing the subject.

The question at hand really is whether we can ever fix mistakes in a protocol specification.

The 2006 RFC (4627) didn’t take benefit of the observation that JSON is used with UTF-8 in the wild.  With 7159 (2014) and 8259 (2017) we progressively did.

The question really is how much of a backward compatibility onus we impose on implementers.
The reality is that JSON works well in the Internet Standard (RFC 8259, 2017) form, and there is no point for implementers to bow to what wasn’t really the reality in 2006 anyway.

So adding any verbiage that could be misused to pressure implementers to implement the deprecated stuff would be counter-productive.  Yes, it might still be a good idea for a JSON implementers to accept BOMs (and "JSON comments", and trailing commas, and all the other cruft that we do to "increase interoperability" and that then hurts interoperability because other people come to rely on that lenience (*)), but the JSON Standard doesn’t have to (even mildly) encourage that.

There are no standard JSON supersets (at least not ones that can be called “JSON” (**)).

Grüße, Carsten

(*) a.k.a. “soup”
(**) (CBOR diagnostic notation clearly is a JSON superset)

> On 2020-06-10, at 16:37, David Golden <xdg@xdg.me> wrote:
> 
> I agree that BOMs don't belong on JSON, but three prior RFC allowed them.  (The first one even specified how to do so.)
> 
> Given a JSON text generated under a previous specification with a UTF-16/32 BOM, ignoring the BOM is incorrect behavior.  As currently written -- copied verbatim from the prior two RFCs when BOMs were legal -- the only interoperability suggestion is to ignore a BOM.
> 
> My proposal does not encourage the use of BOMs or unravel the WG consensus (which I fully support).  It merely prepares implementations for the presence of other implementations that predate the current, more restrictive specification.
> 
> Respectfully yours,
> David
> 
> On Wed, Jun 10, 2020 at 9:43 AM Carsten Bormann <cabo@tzi.org> wrote:
> The WG had pretty strong consensus that BOMs don’t belong on JSON.
> This “MAY” prepares implementations for the presence of other implementations that do not heed that consensus.  No functionality is assigned by this MAY.
> 
> Since Errata are not intended to unravel WG decisions: Reject.
> 
> Apart from that, I seriously don’t understand what the "indicate an alternate encoding” would be — the JSON text already is UTF-8?
> 
> Grüße, Carsten
> 
> 
> > On 2020-06-10, at 15:32, RFC Errata System <rfc-editor@rfc-editor.org> wrote:
> > 
> > The following errata report has been submitted for RFC8259,
> > "The JavaScript Object Notation (JSON) Data Interchange Format".
> > 
> > --------------------------------------
> > You may review the report below and at:
> > https://www.rfc-editor.org/errata/eid6208
> > 
> > --------------------------------------
> > Type: Technical
> > Reported by: David Golden <xdg@xdg.me>
> > 
> > Section: 8.1
> > 
> > Original Text
> > ——————
> > In the interests of interoperability, implementations that parse JSON texts MAY ignore the presence of a byte order mark rather than treating it as an error.
> > 
> > Corrected Text
> > --------------
> > In the interests of interoperability, implementations that parse JSON texts MAY ignore the presence of a byte order mark or MAY interpret a byte order mark to indicate an alternate encoding rather than treating it as an error.
> > 
> > Notes
> > -----
> > The original line is copied from previous RFCs that specifically allowed alternate encodings.  In the context of a new, UTF-8 only restriction, interoperability provisions should also address interpreting legacy formats that predate the restriction.  By omission, readers may conclude that the *only* option for a BOM is to ignore or error.
> > 
> > Instructions:
> > -------------
> > This erratum is currently posted as "Reported". If necessary, please
> > use "Reply All" to discuss whether it should be verified or
> > rejected. When a decision is reached, the verifying party  
> > can log in to change the status and edit the report, if necessary. 
> > 
> > --------------------------------------
> > RFC8259 (draft-ietf-jsonbis-rfc7159bis-04)
> > --------------------------------------
> > Title               : The JavaScript Object Notation (JSON) Data Interchange Format
> > Publication Date    : December 2017
> > Author(s)           : T. Bray, Ed.
> > Category            : INTERNET STANDARD
> > Source              : Javascript Object Notation Update
> > Area                : Applications and Real-Time
> > Stream              : IETF
> > Verifying Party     : IESG
> > 
> > _______________________________________________
> > json mailing list
> > json@ietf.org
> > https://www.ietf.org/mailman/listinfo/json
> 
> 
> 
> -- 
> David Golden <xdg@xdg.me>https://xdg.me/ • Twitter/GitHub: @xdg
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json