Re: [Json] Proposed minimal change for duplicate names in objects

John Cowan <cowan@mercury.ccil.org> Wed, 03 July 2013 16:13 UTC

Return-Path: <cowan@ccil.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 4DCF721F9D9B for <json@ietfa.amsl.com>; Wed, 3 Jul 2013 09:13:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.549
X-Spam-Level:
X-Spam-Status: No, score=-3.549 tagged_above=-999 required=5 tests=[AWL=0.050, 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 eWSB6kQ-uQs2 for <json@ietfa.amsl.com>; Wed, 3 Jul 2013 09:13:13 -0700 (PDT)
Received: from earth.ccil.org (earth.ccil.org [192.190.237.11]) by ietfa.amsl.com (Postfix) with ESMTP id C8D0D21F9D91 for <json@ietf.org>; Wed, 3 Jul 2013 09:13:13 -0700 (PDT)
Received: from cowan by earth.ccil.org with local (Exim 4.72) (envelope-from <cowan@ccil.org>) id 1UuPg8-0007Px-9z; Wed, 03 Jul 2013 12:13:12 -0400
Date: Wed, 3 Jul 2013 12:13:12 -0400
From: John Cowan <cowan@mercury.ccil.org>
To: Paul Hoffman <paul.hoffman@vpnc.org>
Message-ID: <20130703161312.GB32044@mercury.ccil.org>
References: <B86E1D4B-1DC8-4AD6-B8B3-E989599E0537@vpnc.org> <CAK3OfOj3MNNhjwo2bMa5CgoqynzMRVvviBXC8szxt5D17Z7FDg@mail.gmail.com> <F7023266-CD2B-4D10-B462-6C0383FCD255@vpnc.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <F7023266-CD2B-4D10-B462-6C0383FCD255@vpnc.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: John Cowan <cowan@ccil.org>
Cc: Nico Williams <nico@cryptonector.com>, "json@ietf.org WG" <json@ietf.org>
Subject: Re: [Json] Proposed minimal change for duplicate names in objects
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, 03 Jul 2013 16:13:19 -0000

Paul Hoffman scripsit:

> The earlier threads indicated that some people felt streaming parsers
> could not retain the names they had emitted, while others didn't.

It seems to me that a little practical work is in order.  Someone needs
to try out the eight streaming parsers I mentioned, and any others that
they know of, to find out which, if any, (a) report errors on input
containing duplicate names or (b) report only the first value named by a
duplicate name.  A parser that guarantees to return only the last value
cannot, per definitionem, be a streaming parser.

Unfortunately, I have my hands full with Scheme (45 implementations,
anybody?)  and can't take this on.

I will iterate, like Cato the Censor, that we cannot avoid talking
about name equality even if we make no changes in this part of 4627,
since it already says (2.2) that the names within an object SHOULD
be unique.  A unique name is one that is not equal to any other name,
and if this is to mean anything, we have to know what name equality is.
In practice it is clear that name equality is defined as "the same code
points [not units!] in the same order", but this isn't said anywhere.

-- 
John Cowan    cowan@ccil.org    http://ccil.org/~cowan
The present impossibility of giving a scientific explanation is no proof
that there is no scientific explanation. The unexplained is not to be
identified with the unexplainable, and the strange and extraordinary
nature of a fact is not a justification for attributing it to powers
above nature.  --The Catholic Encyclopedia, s.v. "telepathy" (1913)