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

Bjoern Hoehrmann <derhoermi@gmx.net> Thu, 06 June 2013 10:09 UTC

Return-Path: <derhoermi@gmx.net>
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 B434B21F972C for <json@ietfa.amsl.com>; Thu, 6 Jun 2013 03:09:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[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 d-FJ5uZhEsjA for <json@ietfa.amsl.com>; Thu, 6 Jun 2013 03:09:26 -0700 (PDT)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by ietfa.amsl.com (Postfix) with ESMTP id D4A0D21F990D for <json@ietf.org>; Thu, 6 Jun 2013 03:09:25 -0700 (PDT)
Received: from mailout-de.gmx.net ([10.1.76.12]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0LbOHk-1U5RlO32JW-00kvqP for <json@ietf.org>; Thu, 06 Jun 2013 12:09:24 +0200
Received: (qmail invoked by alias); 06 Jun 2013 10:09:24 -0000
Received: from p5B2318C1.dip0.t-ipconnect.de (EHLO netb.Speedport_W_700V) [91.35.24.193] by mail.gmx.net (mp012) with SMTP; 06 Jun 2013 12:09:24 +0200
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX1+bATx0w5ibuWji334F0WWv905UHLuWOoFBjlFmcG U/ifbIklk+tq4o
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Douglas Crockford <douglas@crockford.com>
Date: Thu, 06 Jun 2013 12:09:25 +0200
Message-ID: <ifn0r8dg8j2b8tdkcp74hjtleufiuviob3@hive.bjoern.hoehrmann.de>
References: <51AF8479.5080002@crockford.com>
In-Reply-To: <51AF8479.5080002@crockford.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
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 10:09:30 -0000

* 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.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/