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

John Cowan <> Wed, 03 July 2013 16:13 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 4DCF721F9D9B for <>; Wed, 3 Jul 2013 09:13:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.549
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 ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id eWSB6kQ-uQs2 for <>; Wed, 3 Jul 2013 09:13:13 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id C8D0D21F9D91 for <>; Wed, 3 Jul 2013 09:13:13 -0700 (PDT)
Received: from cowan by with local (Exim 4.72) (envelope-from <>) id 1UuPg8-0007Px-9z; Wed, 03 Jul 2013 12:13:12 -0400
Date: Wed, 3 Jul 2013 12:13:12 -0400
From: John Cowan <>
To: Paul Hoffman <>
Message-ID: <>
References: <> <> <>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: John Cowan <>
Cc: Nico Williams <>, " WG" <>
Subject: Re: [Json] Proposed minimal change for duplicate names in objects
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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
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)