Re: [Json] Generators

Stefan Drees <stefan@drees.name> Mon, 10 June 2013 11:30 UTC

Return-Path: <stefan@drees.name>
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 8410821F8900 for <json@ietfa.amsl.com>; Mon, 10 Jun 2013 04:30:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.092
X-Spam-Level:
X-Spam-Status: No, score=-2.092 tagged_above=-999 required=5 tests=[AWL=0.157, BAYES_00=-2.599, HELO_EQ_DE=0.35]
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 QkgUwBGxHL6Q for <json@ietfa.amsl.com>; Mon, 10 Jun 2013 04:30:24 -0700 (PDT)
Received: from mout.web.de (mout.web.de [212.227.15.14]) by ietfa.amsl.com (Postfix) with ESMTP id 8D16A21F88AC for <json@ietf.org>; Mon, 10 Jun 2013 04:30:23 -0700 (PDT)
Received: from newyork.local.box ([93.129.126.10]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0McFQF-1V2qzq2guV-00JRcl; Mon, 10 Jun 2013 13:30:21 +0200
Message-ID: <51B5B8CD.5090105@drees.name>
Date: Mon, 10 Jun 2013 13:30:21 +0200
From: Stefan Drees <stefan@drees.name>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version: 1.0
To: Markus Lanthaler <markus.lanthaler@gmx.net>
References: <51B58261.5040808@drees.name> <00d201ce65bf$bd7edd50$387c97f0$@lanthaler@gmx.net> <51B5B7F6.20609@drees.name>
In-Reply-To: <51B5B7F6.20609@drees.name>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:R3+qfzcpz0Ok5wb1hbMDALe32XUMbBK+DTNGnokxPD/ KCXqjLY/h10FgWbAJWO1StCe5Xge6apLwnLppGtPcQ2t/8Zw8N EVMwidKBRv2ZGAyB2cfJ2Z/DU0m/ll2QxE6xGgKOIZdgRa59ia wzAc9mtvux3LgikXraP1yEkR5tKwN5RqPBeU8P3N2Ja3d5ePp+ tujF+ARi+BqlgUTD70Bbg==
Cc: json@ietf.org
Subject: Re: [Json] Generators
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: stefan@drees.name
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: Mon, 10 Jun 2013 11:30:30 -0000

Sorry, waited for the URL to be defined by IETF mail archiving, but then 
eventually hit send before entering the reference mentioned in the 
message below. Now here it is:

References:
[1]: http://www.ietf.org/mail-archive/web/json/current/msg00706.html

Stefan.
Am 10.06.13 13:26, schrieb Stefan Drees:
> On 2013-06-10 11:49 CEST, Markus Lanthaler wrote:
>> On Monday, June 10, 2013 9:38 AM, Stefan Drees wrote:
>>> 5.  Generators
>>>
>>>      A JSON generator produces JSON text that MUST strictly conform to
>>>      the JSON grammar.
>>>
>>>      Generators MUST NOT duplicate names in objects if they can avoid or
>>>      detect such duplication.
>>>
>>> """
>> [...]
>>> This "MUST NOT duplicate ... if" reads pretty soft for implementers,
>>> but should be the only consensual non-breaking way out of the
>>> historical dilemma of not enforcing it for generators in the first
>>> place.
>>
>> The "if" makes the MUST NOT conditional which is at odds with its
>> definition
>>
>> """
>> 1. MUST   This word, or the terms "REQUIRED" or "SHALL", mean that the
>>     definition is an absolute requirement of the specification.
>> """
>
> that depends. If we act with care, we have to respect many boundary
> conditions. One is: There is only one term Generators in the spec we
> update minimally, but in reality many polarizing use cases drove
> implementations of such generators into existence (please also cf. [1]
> esp. where listing some of these and further motivate the concurrently
> proposed "UPPERCASE lowercase" selection).
> So the if effectively offers a subclassification we are not allowed to
> enforce by say inventing a second class citizen like eg. a
> DupesGenerator ...
>
>> I would suggest to just drop the if-statement but can see why people
>> would
>> disagree with that. ...
>
> I personally would really wish to allow for trailing commas in arrays
> and objects, but our job - as I understand it - is to update the JSON
> RFC **and** keep the grown ecosystem intact thus defend the RFCs
> coolness, brevity and embracing functionality for all existing
> implementations of Generators, Parsers and combinations thereof. Some of
> these terms may not appear in the charter of the json wg, but might
> match those actually in there ;-) ...