Re: [Json] The names within an object SHOULD be unique.

John Cowan <cowan@mercury.ccil.org> Wed, 05 June 2013 19:00 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 15A7521F8168 for <json@ietfa.amsl.com>; Wed, 5 Jun 2013 12:00:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level:
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[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 FxR87tZjhFFe for <json@ietfa.amsl.com>; Wed, 5 Jun 2013 12:00:30 -0700 (PDT)
Received: from earth.ccil.org (earth.ccil.org [192.190.237.11]) by ietfa.amsl.com (Postfix) with ESMTP id 09C0621F826B for <json@ietf.org>; Wed, 5 Jun 2013 12:00:27 -0700 (PDT)
Received: from cowan by earth.ccil.org with local (Exim 4.72) (envelope-from <cowan@ccil.org>) id 1UkIwc-0004CV-H5; Wed, 05 Jun 2013 15:00:26 -0400
Date: Wed, 05 Jun 2013 15:00:26 -0400
From: John Cowan <cowan@mercury.ccil.org>
To: Douglas Crockford <douglas@crockford.com>
Message-ID: <20130605190026.GD6999@mercury.ccil.org>
References: <51AF8479.5080002@crockford.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <51AF8479.5080002@crockford.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: John Cowan <cowan@ccil.org>
Cc: "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] The names within an object SHOULD be unique.
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, 05 Jun 2013 19:00:35 -0000

Douglas Crockford scripsit:

> This was the biggest blunder in the RFC. SHOULD should have been MUST.
>
> It is, sadly, too late to repair this.

I agree that it's too late to repair this on the acceptance side.
But why can't we say that parsers MUST accept such documents but
authors/producers/ generators MUST NOT create them?

> Instead, we must specify what happens when you do the thing you SHOULD
> NOT do.

+1 to that.

> We need to provide implementations some slack here because some
> implementations do the right thing and reject. Some implementations
> do the lazy thing and take that last use of the name.

Or, indeed, the first use.

-- 
They tried to pierce your heart                 John Cowan
with a Morgul-knife that remains in the         http://www.ccil.org/~cowan
wound.  If they had succeeded, you would
become a wraith under the domination of the Dark Lord.         --Gandalf