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

Eliot Lear <lear@cisco.com> Wed, 03 July 2013 06:35 UTC

Return-Path: <lear@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 CD8F121F9D15 for <json@ietfa.amsl.com>; Tue, 2 Jul 2013 23:35:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -110.317
X-Spam-Level:
X-Spam-Status: No, score=-110.317 tagged_above=-999 required=5 tests=[AWL=0.282, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8, USER_IN_WHITELIST=-100]
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 x4M3KwLuBvKc for <json@ietfa.amsl.com>; Tue, 2 Jul 2013 23:35:45 -0700 (PDT)
Received: from ams-iport-4.cisco.com (ams-iport-4.cisco.com [144.254.224.147]) by ietfa.amsl.com (Postfix) with ESMTP id CF22421F9CF3 for <json@ietf.org>; Tue, 2 Jul 2013 23:35:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=727; q=dns/txt; s=iport; t=1372833344; x=1374042944; h=message-id:date:from:mime-version:to:cc:subject: references:in-reply-to:content-transfer-encoding; bh=v/AuofiWmRYIXm5DCzuPQsV2GVaTWFPJe9cULqEws0M=; b=FQ/b5mibJ/lC4Abk2Z7M0Onsgc3IrftdshrAxBlqYbyVtHBAtxOzOt34 eJs4hQCE128lXVdmdDelhRNy96aVJwOgW2e9kVC8hVMRCnOlTbSCwGZMB Vk5cNmVan0QA9HwrbQjOwj7R04K87kDdjbDXCRr6M1T+FHsW5WFtvfCWr c=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Al0JAHLF01GQ/khR/2dsb2JhbABagwmEAr0SBAQBgQAWdIIkAQEEI1UBEAsaAgUWCwICCQMCAQIBKxoGDQEHAQGIC6oTkR6BJo4/B4JRgRwDl0qRRYMTOg
X-IronPort-AV: E=Sophos;i="4.87,986,1363132800"; d="scan'208";a="15253423"
Received: from ams-core-1.cisco.com ([144.254.72.81]) by ams-iport-4.cisco.com with ESMTP; 03 Jul 2013 06:35:43 +0000
Received: from mctiny.local ([10.61.175.226]) by ams-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id r636Zegb005371 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Jul 2013 06:35:41 GMT
Message-ID: <51D3C63C.5030703@cisco.com>
Date: Wed, 03 Jul 2013 08:35:40 +0200
From: Eliot Lear <lear@cisco.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130620 Thunderbird/17.0.7
MIME-Version: 1.0
To: Nico Williams <nico@cryptonector.com>
References: <B86E1D4B-1DC8-4AD6-B8B3-E989599E0537@vpnc.org> <CAK3OfOj3MNNhjwo2bMa5CgoqynzMRVvviBXC8szxt5D17Z7FDg@mail.gmail.com>
In-Reply-To: <CAK3OfOj3MNNhjwo2bMa5CgoqynzMRVvviBXC8szxt5D17Z7FDg@mail.gmail.com>
X-Enigmail-Version: 1.5.1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Cc: Paul Hoffman <paul.hoffman@vpnc.org>, "json@ietf.org WG" <json@ietf.org>
Subject: Re: [Json] Proposed minimal change for duplicate names in objects
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: Wed, 03 Jul 2013 06:35:51 -0000

Nico,
>
> In short, for streaming parsers (and generators) there's nothing we can do.
>
> What we can do is RECOMMEND that a) generators not produce duplicates
> (and explain how streaming ones cannot prevent dups), and b) that
> parsers use the last name (and explain how streaming ones will produce
> all dups).

To me this isn't strong enough.  I have some sympathy for both the
existing base and for parsers, but generators as an architectural
component should generate unambiguous output, streaming or otherwise. 
And that follow's Postel's Law:
   
"In general, an implementation must be conservative in its sending
behavior, and liberal in its receiving behavior."

-- RFC 791 Section 3.2


Eliot