Re: [Json] Consensus call: establishing name equality

Carsten Bormann <cabo@tzi.org> Mon, 24 June 2013 08:16 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 41D4E21F9A82 for <json@ietfa.amsl.com>; Mon, 24 Jun 2013 01:16:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.212
X-Spam-Level:
X-Spam-Status: No, score=-106.212 tagged_above=-999 required=5 tests=[AWL=0.037, BAYES_00=-2.599, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zsuhJlnydxqg for <json@ietfa.amsl.com>; Mon, 24 Jun 2013 01:15:56 -0700 (PDT)
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 6244921F9A72 for <json@ietf.org>; Mon, 24 Jun 2013 01:15:55 -0700 (PDT)
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.4/8.14.4) with ESMTP id r5O8FUkV004860; Mon, 24 Jun 2013 10:15:30 +0200 (CEST)
Received: from [192.168.217.105] (p548945FE.dip0.t-ipconnect.de [84.137.69.254]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-fb3.informatik.uni-bremen.de (Postfix) with ESMTPSA id 031BF7B40; Mon, 24 Jun 2013 10:15:29 +0200 (CEST)
Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
Content-Type: text/plain; charset="utf-8"
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <CAO1wJ5TV1f0G-WHKnO33TAjSVa2v77vm2kX=otTycyUFZf66pw@mail.gmail.com>
Date: Mon, 24 Jun 2013 10:15:29 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <0C11C9BF-DD21-4863-A3C9-C3987EEA4B64@tzi.org>
References: <DB211AD8-6BBA-4D95-9B6E-F00AA69E584E@vpnc.org> <6BCAAC4F-2B45-43BA-A40B-96F3369A5851@tzi.org> <CAO1wJ5SzsOvj2voaeM83G2FxmEwBSREHP5YtE5T8G-mgoM4jNw@mail.gmail.com> <CAHBU6iv8wGJQGpsswSf0GgkN6uQAXP8XFRbabjzWnNSJoifQzw@mail.gmail.com> <CAO1wJ5S7gvqJUydhfUkweffOxm+DcnEgZVciUVvnzj2gHYrAow@mail.gmail.com> <CAHBU6is5OVK6jVB_=Lu1W0RPEF1+f0wG1GZU44OQ1vbgP8vGgw@mail.gmail.com> <CAO1wJ5TV1f0G-WHKnO33TAjSVa2v77vm2kX=otTycyUFZf66pw@mail.gmail.com>
To: Jacob Davies <jacob@well.com>
X-Mailer: Apple Mail (2.1508)
Cc: JSON WG <json@ietf.org>
Subject: Re: [Json] Consensus call: establishing name equality
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
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, 24 Jun 2013 08:16:03 -0000

On Jun 22, 2013, at 01:54, Jacob Davies <jacob@well.com> wrote:

> Well, even given those givens, what about this:
> 
> http://www.unicode.org/versions/Unicode6.2.0/ch03.pdf
> From Section 3.2:
> 
> C6 A process shall not assume that the interpretations of two
> canonical-equivalent character sequences are distinct.

I think that this argument suffers a bit from not distinguishing a string and its representation.

JSON is never "interpreting" strings, so this clause doesn't seem to apply.

It *is* processing the representation of a string in order to derive the actual string from that.
E.g., by unescaping the character sequences in that representation into the characters of the string, and by removing the enclosing quotes etc.  It may indeed be worth pointing out that this processing is not "interpreting" the Unicode character sequences either *).

(On of the persistent problems with IETF specifications is that the only formal description method used widely, ABNF, makes the reader focus on the representation, when actually it would often be more useful to focus on the represented data object.  It is almost always crucial to clearly distinguish the two.  Clearly, what we are interchanging are the represented objects, so some purists argue we never need to even talk about their interpretation.  That is a fallacy, because there is no interchange unless the interpretations match well enough.)

I think the discussion here would benefit a lot from always clearly making this distinction.
"a" is not a three-character string, it is a three-character JSON representation of a single-character string.

Grüße, Carsten

*): How do you like "\u028ä"?  Well, that may seem invalid and is a bit hard to read, but if may mail client hadn't normalized it under my fingers, it would be the same as "\u028a\u0308", which is a credible upsilon diaeresis (ʊ̈, always a two-character string as there is no combined form).  (In building JSON for interchange, it is probably not so bright to assume it will never be normalized in transit.  At least if you assume that JSON should survive being sent around in e-mail messages.  But that observation is firmly in best practices land...)