Re: [Json] String comparisons -- LAST CHANCE ON PROPOSALS

Carsten Bormann <cabo@tzi.org> Wed, 12 June 2013 06:38 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 DFE3421F9C15 for <json@ietfa.amsl.com>; Tue, 11 Jun 2013 23:38:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.153
X-Spam-Level:
X-Spam-Status: No, score=-106.153 tagged_above=-999 required=5 tests=[AWL=0.096, 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 FRi9bMPgTd1u for <json@ietfa.amsl.com>; Tue, 11 Jun 2013 23:38:50 -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 B1E0E21F9C14 for <json@ietf.org>; Tue, 11 Jun 2013 23:38:49 -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 r5C6cbTY023855; Wed, 12 Jun 2013 08:38:37 +0200 (CEST)
Received: from [192.168.217.105] (p54893401.dip0.t-ipconnect.de [84.137.52.1]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-fb3.informatik.uni-bremen.de (Postfix) with ESMTPSA id C208A377C; Wed, 12 Jun 2013 08:38:36 +0200 (CEST)
Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
Content-Type: text/plain; charset="iso-8859-1"
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <0FBD58CE-748D-419A-8578-CCBF3FDF97CE@vpnc.org>
Date: Wed, 12 Jun 2013 08:38:35 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <78732FDA-84FC-46E9-BC88-2B2D6510ED17@tzi.org>
References: <0FBD58CE-748D-419A-8578-CCBF3FDF97CE@vpnc.org>
To: Paul Hoffman <paul.hoffman@vpnc.org>
X-Mailer: Apple Mail (2.1508)
Cc: "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] String comparisons -- LAST CHANCE ON PROPOSALS
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: Wed, 12 Jun 2013 06:38:56 -0000

On Jun 11, 2013, at 19:44, Paul Hoffman <paul.hoffman@vpnc.org> wrote:

> For purpose of establishing key equality, comparisons MUST be conducted, after all unescaping is done, by comparing numeric character code points. There MUST NOT be any modification of any kind to the characters in keys, including change of case or change between precomposed and decomposed forms.
> 
> For example, the following four keys MUST be considered equivalent:
> 
> * "\u002F"
> * "\u002f"
> * "\/"
> * "/"

-- This uses equal and equivalent as if they are equivalent.
   Note that 2.2 uses "unique", which doesn't quite connect to this text.

-> I would prefer to have a complete proposal that covers the 
   sentence in 2.2 as well and makes sure they connect.

-- Talking about "modification" confuses me.  
   Of course, there is no modification; 
   it is not OK to turn {"A": 1} into {"a": 1} in the parser, 
   or {"\u212b": 1}*) into {"Å": 1}.
   Is this still about the equality check?  Not at all clear to me.

-> Make it clear that this is just reinforcing the numeric comparison of code points.

-- Are "ab" and "ba" equivalent?  They use the same numeric character code points.

-> Say something about comparing the sequences in order.

And, of course, s/key/name/ (equality of names in objects, or really, uniqueness of names in objects).

Grüße, Carsten

*) (had to write the escape: my mail client normalizes the Angstrom sign under my fingers, WTF).