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

Douglas Crockford <douglas@crockford.com> Thu, 06 June 2013 11:18 UTC

Return-Path: <douglas@crockford.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 7D26721F9951 for <json@ietfa.amsl.com>; Thu, 6 Jun 2013 04:18:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.042
X-Spam-Level:
X-Spam-Status: No, score=-2.042 tagged_above=-999 required=5 tests=[AWL=0.557, BAYES_00=-2.599]
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 9minPU7uhSEc for <json@ietfa.amsl.com>; Thu, 6 Jun 2013 04:18:18 -0700 (PDT)
Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by ietfa.amsl.com (Postfix) with ESMTP id 8E5DA21F994F for <json@ietf.org>; Thu, 6 Jun 2013 04:18:18 -0700 (PDT)
Received: from [192.168.0.108] (173-228-7-202.dsl.static.sonic.net [173.228.7.202]) by mrelay.perfora.net (node=mrus4) with ESMTP (Nemesis) id 0Lon23-1UA7WY3aCx-00gBSs; Thu, 06 Jun 2013 07:18:16 -0400
Message-ID: <51B06FEB.5060203@crockford.com>
Date: Thu, 06 Jun 2013 04:18:03 -0700
From: Douglas Crockford <douglas@crockford.com>
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version: 1.0
To: Bjoern Hoehrmann <derhoermi@gmx.net>
References: <51AF8479.5080002@crockford.com> <ifn0r8dg8j2b8tdkcp74hjtleufiuviob3@hive.bjoern.hoehrmann.de>
In-Reply-To: <ifn0r8dg8j2b8tdkcp74hjtleufiuviob3@hive.bjoern.hoehrmann.de>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:8RquXo5ulv6G7jqt3gREv06EZQXqwaR9D1cU4fizZl1 uGzQNddNa5Cn/ZESdEnzwKOMkrIawxe/nUh8BqJH70r+S3HvT4 LBOm8GZOWVgZohXqJSYIfJD1ynLF8/X1A20Bf/Mrv40z2ouWuL 48bKfcBEu2G9XzLH/1liC0OWls3aIFncuh+d+IECVBVhLaA/jD 1IAON3T0kV/bmNum0UYwhz1M2BBF9kVknh+XV49Kv5hTFrcMzF //0ulIzJh8WffDj40d/yNWfENrSP80TtIsdgxA01mApnuemkNo RCGIK4+58Cs/tkQsGq18A/MmomEefB5R2krWokYs3T5cQWK7XX CiuPcWxVGQQo3du//x34=
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: Thu, 06 Jun 2013 11:18:24 -0000

On 6/6/2013 3:09 AM, Bjoern Hoehrmann wrote:
> * Douglas Crockford wrote:
>> This was the biggest blunder in the RFC. SHOULD should have been MUST.
>>
>> It is, sadly, too late to repair this. Instead, we must specify what
>> happens when you do the thing you SHOULD NOT do. 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.
> I have seen no evidence that the world is going to standardise around
> rejecting JSON content with repeated object keys, and consequently do
> not support any suggestion in the specification that taking the last
> value is worse than rejecting the whole content. Saying that parsers
> "MUST either or" is fine though.
Taking the last is clearly worse, as will be explained in the new 
Security Considerations.