Re: [Json] Questions regarding duplicate names

"Matt Miller (mamille2)" <mamille2@cisco.com> Sat, 27 July 2013 20:23 UTC

Return-Path: <mamille2@cisco.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 E1BA621F860B for <json@ietfa.amsl.com>; Sat, 27 Jul 2013 13:23:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
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 Bc+9pCg5un+I for <json@ietfa.amsl.com>; Sat, 27 Jul 2013 13:22:57 -0700 (PDT)
Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) by ietfa.amsl.com (Postfix) with ESMTP id A157711E80F3 for <json@ietf.org>; Sat, 27 Jul 2013 13:22:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=7318; q=dns/txt; s=iport; t=1374956576; x=1376166176; h=from:to:subject:date:message-id:references:in-reply-to: mime-version; bh=qGhgYv1FXMk+tGAQnlnajvNIs0X5EQ0k/vY7I7kdkI0=; b=bGaaDjUSJGH/yD/yv9NO1HvUzNV0bfr6ZlTwnRF//QCbZpB5DRZ1J3nc 2fhz94we7QvRHrZaudfyYbfJYrGGm1OHu0YOqmxT73f/eTz/jK2uXR56d MzrlzzTgVVN6HA9qhZI3kICtTjgMRGax6YdGoAwu/WuujPgDCY8rKzUXE 8=;
X-Files: smime.p7s : 4136
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhQFAAEr9FGtJV2a/2dsb2JhbABbgwaBBb1WgRoWdIIlAQEEgQkCAQgiJAIwJQIEGwaIArgNjkiBBDiDFm8DkBKBLZdsgxSBaEI
X-IronPort-AV: E=Sophos; i="4.89,758,1367971200"; d="p7s'?scan'208"; a="240321768"
Received: from rcdn-core-3.cisco.com ([173.37.93.154]) by rcdn-iport-7.cisco.com with ESMTP; 27 Jul 2013 20:22:54 +0000
Received: from xhc-aln-x10.cisco.com (xhc-aln-x10.cisco.com [173.36.12.84]) by rcdn-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id r6RKMsZD010198 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for <json@ietf.org>; Sat, 27 Jul 2013 20:22:54 GMT
Received: from xmb-aln-x11.cisco.com ([169.254.6.159]) by xhc-aln-x10.cisco.com ([173.36.12.84]) with mapi id 14.02.0318.004; Sat, 27 Jul 2013 15:22:54 -0500
From: "Matt Miller (mamille2)" <mamille2@cisco.com>
To: "json@ietf.org WG" <json@ietf.org>
Thread-Topic: [Json] Questions regarding duplicate names
Thread-Index: AQHOgdBKgh653pxNL0igmJOeyMV3Rpl5XlQA
Date: Sat, 27 Jul 2013 20:22:53 +0000
Message-ID: <BF7E36B9C495A6468E8EC573603ED9411EE4ED06@xmb-aln-x11.cisco.com>
References: <51E4B6AE.4040502@qti.qualcomm.com>
In-Reply-To: <51E4B6AE.4040502@qti.qualcomm.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [10.21.77.3]
Content-Type: multipart/signed; boundary="Apple-Mail=_1E8107AD-1930-4AFF-9F17-7799C2D16E1B"; protocol="application/pkcs7-signature"; micalg=sha1
MIME-Version: 1.0
Subject: Re: [Json] Questions regarding duplicate names
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: Sat, 27 Jul 2013 20:23:06 -0000

Hello all,

Here is an attempt to summarize responses to the duplicate names questions.

The consensus from this thread seems to be that duplicate names within the same JSON object are not generally desirable.

There appears to be rough consensus that a generator (for some definition of "generator") ought to take steps to avoid emitting duplicate names, but that there exists a non-trivial amount of software where the prohibition of duplicates cannot be completely enforced.

There appears to be consensus that parsers (for some definition of "parser") need to be able to deal with duplicate names in some manner.  There is rough consensus that 4627bis ought to provide guidance on how parsers deal with duplicate names.  However, there is no one option that has any consensus; instead, there appears to be acquiescence that a given parser ought to support one option from a limited set of documented choices.  The most common suggestions -- which appear to reflect the majority of existing implementations -- far so:

* report an error in some manner
* report the last value that appears in the JSON text
* report all the values that appear in the JSON text


- Paul Hoffman and Matt Miller