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

"Markus Lanthaler" <markus.lanthaler@gmx.net> Wed, 03 July 2013 08:31 UTC

Return-Path: <markus.lanthaler@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 4B6CA21F9C20 for <json@ietfa.amsl.com>; Wed, 3 Jul 2013 01:31:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.15
X-Spam-Level:
X-Spam-Status: No, score=-1.15 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, MSGID_MULTIPLE_AT=1.449]
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 90kV+EkwgSVJ for <json@ietfa.amsl.com>; Wed, 3 Jul 2013 01:31:15 -0700 (PDT)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by ietfa.amsl.com (Postfix) with ESMTP id 6DDD321F9ACA for <json@ietf.org>; Wed, 3 Jul 2013 01:31:15 -0700 (PDT)
Received: from mailout-de.gmx.net ([10.1.76.31]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0M3xlc-1U2kLI0jru-00rUbM for <json@ietf.org>; Wed, 03 Jul 2013 10:31:14 +0200
Received: (qmail invoked by alias); 03 Jul 2013 08:31:13 -0000
Received: from 178.115.249.85.wireless.dyn.drei.com (EHLO Vostro3500) [178.115.249.85] by mail.gmx.net (mp031) with SMTP; 03 Jul 2013 10:31:13 +0200
X-Authenticated: #419883
X-Provags-ID: V01U2FsdGVkX1/WQzI4JPLWn34wbQIAlPCqSpnJjcZArg/BOIiPBF mOyQXfyrJ8FHWI
From: Markus Lanthaler <markus.lanthaler@gmx.net>
To: json@ietf.org
References: <B86E1D4B-1DC8-4AD6-B8B3-E989599E0537@vpnc.org>
In-Reply-To: <B86E1D4B-1DC8-4AD6-B8B3-E989599E0537@vpnc.org>
Date: Wed, 03 Jul 2013 10:31:09 +0200
Message-ID: <00e301ce77c7$aca7d300$05f77900$@lanthaler>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
thread-index: Ac53e4ELd2GZQxDZTbqu9paZqIauaAASw6IA
Content-Language: de
X-Y-GMX-Trusted: 0
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 08:31:20 -0000

On Wednesday, July 03, 2013 1:26 AM, Paul Hoffman wrote:
> Do either or both of these proposals work for people in the WG?

I would be fine with proposal 1.

I think we should really ask ourselves what we would do if we could start
with a clean slate and try "approximate" that by tweaking the RFC in that
direction. There may be *some* situations where we have to fall back to say
how it should be done (no duplicates names in objects) but acknowledging
that, due to historic reasons, there are implementations which do it
differently. If we do that too often, however, I don't see any value in this
exercise and we should stop it.


> 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