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

Stephan Beal <sgbeal@googlemail.com> Thu, 06 June 2013 16:03 UTC

Return-Path: <sgbeal@googlemail.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 0938121F9A11 for <json@ietfa.amsl.com>; Thu, 6 Jun 2013 09:03:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.331
X-Spam-Level:
X-Spam-Status: No, score=-1.331 tagged_above=-999 required=5 tests=[AWL=-0.646, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MISSING_HEADERS=1.292, NO_RELAYS=-0.001]
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 zB5VWT+Khjqs for <json@ietfa.amsl.com>; Thu, 6 Jun 2013 09:03:23 -0700 (PDT)
Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) by ietfa.amsl.com (Postfix) with ESMTP id A5F5121F9A0D for <json@ietf.org>; Thu, 6 Jun 2013 09:03:22 -0700 (PDT)
Received: by mail-wi0-f175.google.com with SMTP id hn14so511065wib.2 for <json@ietf.org>; Thu, 06 Jun 2013 09:03:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=pvQzJt/1/WrPmXjCyG2g/+tvAVEsXiDvE1rJsE1xEuA=; b=HUwNUmoGgXX3nYB93cr+Wqoao60L57wjBQ/vbKa6oyEpexcUJOKD6156wOXEOv10M8 Uc5doHzyThzwr7TnT1OC/0c4jPyuf1euekTM4D1vYrK3rUBm8lmssVOiw3x07N9XvOej 6J9IMZhhCG15C5Bd+wUfypmIEplj5kpUbuF5VO/c9V/eor5EFt9Uwn0aRFw0BBcFNsRa 4d7GKpltbDvDX845uGuA9PzEce6UHlhF+6U037ssUJJX3gULAY7IVsIvmG1vST638wH8 UgK3xpIRPjEMzp7XUec0U0XSsbDT6ZNfOXIiTnELTh+ZFW7VbpZuU/QZtmMOrxHJvCF1 7N6w==
MIME-Version: 1.0
X-Received: by 10.194.83.5 with SMTP id m5mr32851615wjy.20.1370534601307; Thu, 06 Jun 2013 09:03:21 -0700 (PDT)
Received: by 10.194.42.230 with HTTP; Thu, 6 Jun 2013 09:03:21 -0700 (PDT)
In-Reply-To: <DA7A83A2-1C1F-4E74-BF6A-DA943B07AB59@vpnc.org>
References: <51AF8479.5080002@crockford.com> <51AF9ACF.5020507@cisco.com> <D0A99569-0915-4862-A7AE-9DE51C2E90C0@yahoo.com> <51AFB3F8.8060708@crockford.com> <8F32953C-C788-4DC9-888E-920E2BEB7FDD@yahoo.com> <831B8E46-F239-4353-8F95-8DF3F9BD2E78@yahoo.com> <51AFC924.2030805@crockford.com> <DA7A83A2-1C1F-4E74-BF6A-DA943B07AB59@vpnc.org>
Date: Thu, 06 Jun 2013 18:03:21 +0200
Message-ID: <CAKd4nAg9spq_i4f9vULJh9eCqSWxG9nZgv-yHJP6wungbJrr8Q@mail.gmail.com>
From: Stephan Beal <sgbeal@googlemail.com>
Cc: "json@ietf.org" <json@ietf.org>
Content-Type: multipart/alternative; boundary="047d7b5d8bd510475104de7e74a2"
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 16:03:24 -0000

On Thu, Jun 6, 2013 at 5:24 PM, Paul Hoffman <paul.hoffman@vpnc.org> wrote:

> In Section 2.2:
> Current:
>    The names within an object SHOULD be unique.
> Proposed:
>    If the names within an object are not unique, the result of parsing the
>    object is unpredictable, and the parse may even fail completely. Thus,
>    the names within an object SHOULD be unique.
>

+1 for anything along those lines.


> In Section 4, add a new paragraph:
>    If a parser encounters an object with duplicate names, the parser MAY
>    fail to parse the JSON text; if the parser accepts objects with
> duplicate
>    names, it SHOULD accept only the last name/value pair that has the
>    duplicate name.
>

+1. That keeps (i think) any current implementation behaviours compliant
while making the intended/best-practice behaviour clear.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal