Re: [Json] New Version Notification - draft-ietf-json-rfc4627bis-08.txt

Carsten Bormann <cabo@tzi.org> Thu, 05 December 2013 16:01 UTC

Return-Path: <cabo@tzi.org>
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 EFEAB1AE071 for <json@ietfa.amsl.com>; Thu, 5 Dec 2013 08:01:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.551
X-Spam-Level:
X-Spam-Status: No, score=-1.551 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, SPF_HELO_PASS=-0.001] 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 SjJeomGs4XQL for <json@ietfa.amsl.com>; Thu, 5 Dec 2013 08:01:09 -0800 (PST)
Received: from informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) by ietfa.amsl.com (Postfix) with ESMTP id F176C1AE07F for <json@ietf.org>; Thu, 5 Dec 2013 08:01:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from smtp-fb3.informatik.uni-bremen.de (smtp-fb3.informatik.uni-bremen.de [134.102.224.120]) by informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id rB5G12fO021637; Thu, 5 Dec 2013 17:01:02 +0100 (CET)
Received: from [192.168.217.105] (p54890AEF.dip0.t-ipconnect.de [84.137.10.239]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-fb3.informatik.uni-bremen.de (Postfix) with ESMTPSA id 0A0A2D5F; Thu, 5 Dec 2013 17:01:01 +0100 (CET)
Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\))
Content-Type: text/plain; charset="windows-1252"
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <28869F37-1FC4-4F05-A729-DAB14CDA3757@vpnc.org>
Date: Thu, 05 Dec 2013 17:00:59 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <CF90FAA0-9E3C-42D1-8255-F8640782ACC9@tzi.org>
References: <20131205020911.25035.18142.idtracker@ietfa.amsl.com> <CAHBU6ivc-Jewruz4GYsYC3R0K5-tneMp20fRYv13j8ii+CZS2Q@mail.gmail.com> <3461B710-B969-4315-854B-E2C30B2141FA@tzi.org> <28869F37-1FC4-4F05-A729-DAB14CDA3757@vpnc.org>
To: Paul Hoffman <paul.hoffman@vpnc.org>
X-Mailer: Apple Mail (2.1822)
Cc: Tim Bray <tbray@textuality.com>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] New Version Notification - draft-ietf-json-rfc4627bis-08.txt
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: Thu, 05 Dec 2013 16:01:11 -0000

On 05 Dec 2013, at 16:27, Paul Hoffman <paul.hoffman@vpnc.org> wrote:

> <hat on>
> 
> On Dec 5, 2013, at 12:20 AM, Carsten Bormann <cabo@tzi.org> wrote:
> 
>> Major new bug (apart from the one Rob found):
>> 
>> — A SHOULD-level requirement for BOM tolerance is a gratuitous change.  (I thought we were shooting for a MAY.)
> 
> There was a reasonable number of people who were very concerned that JSON documents that were being sent around with a BOM would be rejected.

As they should be.

One way to deal with a common mistake is to legitimize it.

Doing this too often leads to soup.

(The alternative is to point out the mistake is a mistake.)

However, I’m not at all convinced that people adding BOMs to their JSON senders even is a common mistake.

I have seen way more HT characters (TABs) in strings, trailing commas etc., than BOMs in JSON documents.  Should we legitimize those, too?

> Given the current text:
>   Implementations have been observed to generate JSON texts prefixed
>   with a Byte Order Mark character.  While this is not allowed by the
>   grammar in this specification, in the interests of interoperability
>   it is RECOMMENDED that implementations which parse JSON texts ignore
>   the presence of a byte order mark rather than treating it as an
>   error.
> what change would you make?

it is RECOMMENDED that implementations which parse JSON texts ignore
->
implementations that parse JSON texts MAY WISH TO ignore

(OK, without the RFC 6919ism, as apt as that may be here, that becomes:)

implementations that parse JSON texts MAY ignore

(Maybe add that this is mostly relevant for parsers that are used to interpret JSON files entered by users, not so much for those used for data interchange.)

>> — Even if the WG decides that change is warranted, the text on -08 will be read as “JSON now allows BOMs” by anyone who is not a language lawyer.  The “SHOULD accept” needs to be accompanied by a (redundant, but contextually necessary) “MUST NOT send”.
> 
> If it is redundant (and it is, given the carefully worded intro to that sentence), why do you feel it is "contextually necessary”?

Because a number of decades of watching people interpret specifications teaches me that people will read this as “JSON now allows BOMs”, all careful wording aside.  So they will add BOMs to all JSON documents they send and then complain to the other JSON implementers that haven’t changed their implementations for BOM tolerance that “this is now valid JSON”, as you "SHOULD ignore the BOM".

Adding the (theoretically redundant) “MUST NOT send” makes it more likely that this obvious misunderstanding is nipped in the bud.

If the ensuing clarity creates too much cognitive dissonance, at least s/the grammar in//.

Grüße, Carsten