Re: [Json] Consensus call: establishing name equality

Norbert Lindenberg <ietf@lindenbergsoftware.com> Fri, 21 June 2013 23:45 UTC

Return-Path: <ietf@lindenbergsoftware.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 2813421F9EDF for <json@ietfa.amsl.com>; Fri, 21 Jun 2013 16:45:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.795
X-Spam-Level:
X-Spam-Status: No, score=-3.795 tagged_above=-999 required=5 tests=[AWL=-0.196, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 O3fDCM+uY5e9 for <json@ietfa.amsl.com>; Fri, 21 Jun 2013 16:45:27 -0700 (PDT)
Received: from mirach.lunarpages.com (mirach.lunarpages.com [216.97.235.70]) by ietfa.amsl.com (Postfix) with ESMTP id 762C221F9EE0 for <json@ietf.org>; Fri, 21 Jun 2013 16:45:27 -0700 (PDT)
Received: from 50-0-136-241.dsl.dynamic.sonic.net ([50.0.136.241]:58273 helo=[192.168.0.5]) by mirach.lunarpages.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80) (envelope-from <ietf@lindenbergsoftware.com>) id 1UqB1A-002776-Au; Fri, 21 Jun 2013 16:45:24 -0700
Mime-Version: 1.0 (Apple Message framework v1283)
Content-Type: text/plain; charset="us-ascii"
From: Norbert Lindenberg <ietf@lindenbergsoftware.com>
In-Reply-To: <CAHBU6is5OVK6jVB_=Lu1W0RPEF1+f0wG1GZU44OQ1vbgP8vGgw@mail.gmail.com>
Date: Fri, 21 Jun 2013 16:45:20 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <DCEE0FDF-4470-475C-95DB-34B2BA663F08@lindenbergsoftware.com>
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>
To: Tim Bray <tbray@textuality.com>
X-Mailer: Apple Mail (2.1283)
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - mirach.lunarpages.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lindenbergsoftware.com
X-Get-Message-Sender-Via: mirach.lunarpages.com: authenticated_id: ietf@lindenbergsoftware.com
Cc: Norbert Lindenberg <ietf@lindenbergsoftware.com>, Carsten Bormann <cabo@tzi.org>, Jacob Davies <jacob@well.com>, Paul Hoffman <paul.hoffman@vpnc.org>, 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: Fri, 21 Jun 2013 23:45:32 -0000

On Jun 21, 2013, at 16:21 , Tim Bray wrote:

> On Fri, Jun 21, 2013 at 4:15 PM, Jacob Davies <jacob@well.com> wrote:
> 
> Is this definition of equality needed elsewhere in the document though? Standing alone it seems a little odd - there's no discussion how to compare two numbers, two objects, or two lists for equality, so why are strings-used-for-names special?
> 
> Because 
> - We talk about duplicates so it's important to define what duplicate means

Correct - section 2.2, "The names within an object SHOULD be unique."

> - they are, in effect, hash-table keys, so comparison really matters

That seems out of scope for the spec - the spec may cover the output of the parser, but not what clients do with the output. We can't stop clients from treating names as case insensitive, for example.

However, the comment that eventually led to this proposal was actually about a somewhat different problem [1]:

> It should say explicitly that these three all produce exactly the same result:
>     "\u002F"
>     "\/"
>     "/"
> 
> I have seen confusion about this.

This comment is about how the parser interprets JSON text and what its output is. The three input strings shown, as well as "\u002f", should all result in an output string containing the single code point U+002F.

This important information seems to have gotten lost in the subsequent discussion.

To say that the four input strings must be considered equivalent then becomes unnecessary because they result in the same name.

[1] http://www.ietf.org/mail-archive/web/json/current/msg00372.html

Norbert