Re: [Json] Proposed minimal change for duplicate names in objects

Vinny A <jsontest@yahoo.com> Tue, 02 July 2013 23:33 UTC

Return-Path: <jsontest@yahoo.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 743AE21F9AD6 for <json@ietfa.amsl.com>; Tue, 2 Jul 2013 16:33:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=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 2XocxVJv+Ro7 for <json@ietfa.amsl.com>; Tue, 2 Jul 2013 16:33:46 -0700 (PDT)
Received: from nm13-vm4.bullet.mail.ne1.yahoo.com (nm13-vm4.bullet.mail.ne1.yahoo.com [98.138.91.173]) by ietfa.amsl.com (Postfix) with ESMTP id 3DCB921F9ACD for <json@ietf.org>; Tue, 2 Jul 2013 16:33:46 -0700 (PDT)
Received: from [98.138.90.53] by nm13.bullet.mail.ne1.yahoo.com with NNFMP; 02 Jul 2013 23:33:44 -0000
Received: from [98.138.89.175] by tm6.bullet.mail.ne1.yahoo.com with NNFMP; 02 Jul 2013 23:33:44 -0000
Received: from [127.0.0.1] by omp1031.mail.ne1.yahoo.com with NNFMP; 02 Jul 2013 23:33:44 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 537078.12723.bm@omp1031.mail.ne1.yahoo.com
Received: (qmail 16354 invoked by uid 60001); 2 Jul 2013 23:33:44 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1372808024; bh=RAjPVvjJ0WCAugS8aBCFHQR0YgkjxwukXNEKGBwWfDg=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=QiDLUfpqGtcZSCzZlW+xTg9XHZ9GgT9WYI9jJ7P3tng7m7RHJCtB4rLGfggz/Dh8bHz9E2I+ei6TwC7oL3geK0zRn5G8CRrwkpdna1JW/jx2iV3Zla0VC3QAnNs6zcjnyBZ+jaHVHs550aWvTzws/JbQ7gPclxQ9nCcUd5w5Mb8=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=PoobaLvxFswc2VMxyAyQzKUXe8qVwcJRUd4dWpLwTRRHyWlL6fCXRjzI+8ncA3j0/+D6n0LOUgFOBWHGHopTWakqzD2ZREKwM/glUdPobvWrLI46LNiE78kaJcKGbumea6MYtTHoSOMqqUIWsk+nvdrk7IZDlFA2RK5f7cIAuGw= ;
X-YMail-OSG: D4I2Ac4VM1kn.eGq3xVhjP1K.FUUhPgofbA_friBmzdZb64 _zfeLTKpzQB8n543gW4cbLUQqRZoVhdYTwLk0GazEfx0z9_Png1KCh8wi0uz V55tenMPatlFSN07ziF0630.axY7pjtc9Zvwr_bdf618vrpVcVK2aelej7Tr q8abgrnde0l367QerxHmwQK6Luy1huPypEbtyEJCUeZP7AJSq58GJ30BJvop iaefi54g2AmbL3drjIp76HB1NAgDNGDDKvBL_Al1iOYe03bteRyw7UC_PhT9 zfLN0FgtUUSsbq7HCg4xIDRje7xu5htUtPmT6umjhzTvv.GdWO7Vv00aEJBb D_Aw8V98xmxMYWFkdyZiuuBMS9yTlH3YuEJtcZxKdOTHRakbc6AA80ug0oiK oCsQTCxmr1ld5B_1g2CAqcAXpMFbaQYQC6e7jmVQkfFH7z4dFayxsyOfXwRc iaRVJ0.cKuxzEZucn2JYyyqtNPhVh2J.gEhHyG16CpPvgN8yVJBV_Rj2SS0P nnnsyNzD8BLGtf66SlG4yym6W0Mu4.5.YqXN.BtM4cg4C05EaHhBQzHHI9kB 3DF_HRSzFlwdIAr561_j72UkBW9TOs4Hx6CeUWtqSxpKDWNg-
Received: from [76.29.100.42] by web125604.mail.ne1.yahoo.com via HTTP; Tue, 02 Jul 2013 16:33:44 PDT
X-Rocket-MIMEInfo: 002.001, SSBwcmVmZXIgcHJvcG9zYWwgMSwgYXMgcHJvcG9zYWwgMiBtYXkgY2F1c2UgdW5kdWUgYnVyZGVuIG9uIHBhcnNlcnMgKHRoZXkgbXVzdCBrZWVwIHRyYWNrIG9mIGFsbCBwYXN0IGtleXMsIHRoZW4gd2UgYWxzbyBoYXZlIHRvIGRpc2N1c3Mgc3RyaW5nIGtleSBjb21wYXJpc29uIHdoaWNoIGlzIGRlY2lkZWRseSBub3QgYSBtaW5pbWFsIHRvcGljKS4KwqAKLS0tLS0tLS0tLS0tLS0tLQotVmlubnkKd3d3Lmpzb250ZXN0LmNvbQoKCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwogRnJvbTogUGEBMAEBAQE-
X-Mailer: YahooMailWebService/0.8.148.557
References: <B86E1D4B-1DC8-4AD6-B8B3-E989599E0537@vpnc.org>
Message-ID: <1372808024.6200.YahooMailNeo@web125604.mail.ne1.yahoo.com>
Date: Tue, 2 Jul 2013 16:33:44 -0700 (PDT)
From: Vinny A <jsontest@yahoo.com>
To: Paul Hoffman <paul.hoffman@vpnc.org>, "json@ietf.org WG" <json@ietf.org>
In-Reply-To: <B86E1D4B-1DC8-4AD6-B8B3-E989599E0537@vpnc.org>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="-685807438-553746768-1372808024=:6200"
Subject: Re: [Json] Proposed minimal change for duplicate names in objects
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: Vinny A <jsontest@yahoo.com>
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: Tue, 02 Jul 2013 23:33:51 -0000

I prefer proposal 1, as proposal 2 may cause undue burden on parsers (they must keep track of all past keys, then we also have to discuss string key comparison which is decidedly not a minimal topic).
 
----------------
-Vinny
www.jsontest.com



________________________________
 From: Paul Hoffman <paul.hoffman@vpnc.org>
To: "json@ietf.org WG" <json@ietf.org> 
Sent: Tuesday, July 2, 2013 6:25 PM
Subject: [Json] Proposed minimal change for duplicate names in objects
 

<chair hats on>

Do either or both of these proposals work for people in the WG?

--Matt Miller and Paul Hoffman

The following are proposed minimal changes to make the JSON spec interoperable with respect to
objects that have duplicate names.

Proposal 1:

In section 2.2 (Grammar -> Objects):
  No change
In section 4 (Parsers):
  Add: "If a parser encounters an object with duplicate names, the parser MUST use only the last
  name/value pair that has the duplicate name.
In section 5 (Generators):
  Add: "The names within an object SHOULD be unique."

Proposal 2:

Same as Proposal 1 *except* that a second sentence is added for section 4: "A parser that streams
  its outputs MUST fail to finish parsing if it encounters more than one name/value pair with the
  same name."

_______________________________________________
json mailing list
json@ietf.org
https://www.ietf.org/mailman/listinfo/json