Re: [Json] Generators

Nico Williams <nico@cryptonector.com> Mon, 10 June 2013 18:00 UTC

Return-Path: <nico@cryptonector.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 09CE021F9976 for <json@ietfa.amsl.com>; Mon, 10 Jun 2013 11:00:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 GQbvOt2h4yaA for <json@ietfa.amsl.com>; Mon, 10 Jun 2013 11:00:53 -0700 (PDT)
Received: from homiemail-a26.g.dreamhost.com (caiajhbdcaid.dreamhost.com [208.97.132.83]) by ietfa.amsl.com (Postfix) with ESMTP id 0AB3D21F9968 for <json@ietf.org>; Mon, 10 Jun 2013 11:00:52 -0700 (PDT)
Received: from homiemail-a26.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a26.g.dreamhost.com (Postfix) with ESMTP id A0B14B8058 for <json@ietf.org>; Mon, 10 Jun 2013 11:00:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type; s=cryptonector.com; bh=QFIGNW5LDUmWoG+vi8ZB 4e4p3ZA=; b=tGsdnA/BcOjqmBd0Kbz46L27FZIyeh2QRlr1XmWXzPf2hq/0DoLu tXMM34rZymcN1afGsR9PH2eEKighFohxkXsXwqetPQPIUKMF16ZWhkH6VYpIvfdz Osr+jfdqg+OK6v0GONiD/LtxTXq0IuxqCzvbX6RVLyFNA88fVi/JB6w=
Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a26.g.dreamhost.com (Postfix) with ESMTPSA id 4D86BB8057 for <json@ietf.org>; Mon, 10 Jun 2013 11:00:51 -0700 (PDT)
Received: by mail-wi0-f182.google.com with SMTP id m6so1172200wiv.15 for <json@ietf.org>; Mon, 10 Jun 2013 11:00:49 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GXniu/qfZVoeIG8O8PZLOQCi4BWc/oKS461QIQsfNc8=; b=FlQ+HPvQJr8iVFWTC0XuvhIZODMh0oIeJvgBx91yZJ9Dayv5qP2VjTpXuWzk+sKx2o kAjCK3HOHA5sdi2ArLJ+Tb8AsOJOTodhF8ltWcCOPFXoqIwImw4nGIfHSeu6f7+D7cgf e27le064XY/wLSOGeLkqgeEbK3Yow0W0IFL+NqoqcaY6op+X9ctY/T2EMS6X6yVMUGfE 4Eft7zbgFIGkQxsIUT/23ucMbx48wmASgcTDU5YWk6q5x6V7T2FZ7rJKIUjCkCLXo/rL 5k8bV94yzbnjFEY6UUjuW8UrI1C/wqLUsUkE7VH0XJ+yg/hoHie5nSv8TBwc1hdANcI3 uGTw==
MIME-Version: 1.0
X-Received: by 10.180.90.164 with SMTP id bx4mr5327295wib.13.1370887249671; Mon, 10 Jun 2013 11:00:49 -0700 (PDT)
Received: by 10.216.63.136 with HTTP; Mon, 10 Jun 2013 11:00:49 -0700 (PDT)
In-Reply-To: <8512D965-C32C-4C69-A709-350333C925A0@vpnc.org>
References: <51B58261.5040808@drees.name> <8512D965-C32C-4C69-A709-350333C925A0@vpnc.org>
Date: Mon, 10 Jun 2013 13:00:49 -0500
Message-ID: <CAK3OfOg4QmFw3jJ8wy39EMr4GNkYaCddvk_BoX22YE+YgHo==Q@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: Paul Hoffman <paul.hoffman@vpnc.org>
Content-Type: text/plain; charset="UTF-8"
Cc: stefan@drees.name, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] Generators
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: Mon, 10 Jun 2013 18:00:59 -0000

On Mon, Jun 10, 2013 at 12:35 PM, Paul Hoffman <paul.hoffman@vpnc.org> wrote:
> <no hat>
> On Jun 10, 2013, at 12:38 AM, Stefan Drees <stefan@drees.name> wrote:
>>   Generators MUST NOT duplicate names in objects if they can avoid or
>>   detect such duplication.
>
> +1 to the others who have said "yuck" to the poor use of 2119 MUST here. Further, this is a significant change from both RFC 4726 and ECMAScript. Proposed new wording:

Agreed.  If we want a MUST then we need to distinguish types of
encoders/parsers ("non-streaming ... MUST ...; streaming ...
MAY/SHOULD ...").  That, I think, is why it might be valuable to
distinguish types of encoders/parsers: so we can apply requirements to
one common implementation type that we cannot to the other.

The RFC2119 approach to this is to say SHOULD/SHOULD NOT and explain
what exceptions might be made.

Six of one, half a dozen of the other... I'd prefer a construction
that ends up having a MUST because I suspect it will be understood
more readily by future implementors, but either construction will do
in the end.

Although, to be extra careful here, since this sub-thread is about
encoders, I'm not sure that a non-streaming encoder can be expected to
detect duplicates in a has table (which would normally be an error at
insertion time, but let's say it's happened).  And so perhaps we can't
really distinguish *encoder* types, only parser types.

Nico
--