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

Nico Williams <nico@cryptonector.com> Sun, 07 July 2013 01:20 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 7BE0A21F9A4A for <json@ietfa.amsl.com>; Sat, 6 Jul 2013 18:20:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.956
X-Spam-Level:
X-Spam-Status: No, score=-1.956 tagged_above=-999 required=5 tests=[AWL=0.021, 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 YNX0v6UxQY+N for <json@ietfa.amsl.com>; Sat, 6 Jul 2013 18:20:23 -0700 (PDT)
Received: from homiemail-a73.g.dreamhost.com (caiajhbdcbbj.dreamhost.com [208.97.132.119]) by ietfa.amsl.com (Postfix) with ESMTP id 8B55721F9980 for <json@ietf.org>; Sat, 6 Jul 2013 18:20:23 -0700 (PDT)
Received: from homiemail-a73.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a73.g.dreamhost.com (Postfix) with ESMTP id 033341F007C for <json@ietf.org>; Sat, 6 Jul 2013 18:20:23 -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=ph6UsZXYpsJlpU2kFOue 5fMGvx0=; b=l6Lubt9MVqrABpRo7eJK9r5fS8ejVjPm5MbTtZeyFoZJaZSFvH2/ UWKmCqfDX2fWlVhnW/fNFw79fn1Y2TQXvANI/5P5m9MyiOgBRyfnX9Jqn13Li6OG mPMtYMyp9YH5s2o/ICJvszoS/z2hhIBBuXc3rVbXRabrARZv9QIyXBE=
Received: from mail-we0-f175.google.com (mail-we0-f175.google.com [74.125.82.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a73.g.dreamhost.com (Postfix) with ESMTPSA id 9D2931F0081 for <json@ietf.org>; Sat, 6 Jul 2013 18:20:22 -0700 (PDT)
Received: by mail-we0-f175.google.com with SMTP id t59so2790272wes.20 for <json@ietf.org>; Sat, 06 Jul 2013 18:20:20 -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=0Cv3ofJIz8fp1gruHKWWaclGJMtTKthqCZ3aK/tkN14=; b=ajMFIravGuVgmL/BgnbuHuK0vpq2NpxXY5LwmE7lcjAEdPEBl6m5fI5qC20uQyNoWF Uk3FuEMNXG7JVQ77Ck2KZ0TWSlqrytQ2TK+hQXtMQDXJO3kI7WVSBm6o0MIpZcv5UsXc KrzFRRUKpR+BBoZCllKdBWr4SEM4ot+OUnVOL3XXHTQhGjfiiyzyp/Yl3Q0p/A3HznXk U4blEXB60AcBukRpCLI+PDeqpf7Hwt/uHBbVQsE+YI3ysMMf+vnyDHtABNY8sro4IgIz SfeFs5xwbR9fXSD858Yea43r9HJnafbbvavaY/1faZK0ZN009b0IwKReRF3VD05n44BZ d1hA==
MIME-Version: 1.0
X-Received: by 10.180.210.148 with SMTP id mu20mr26072776wic.38.1373160020760; Sat, 06 Jul 2013 18:20:20 -0700 (PDT)
Received: by 10.216.152.73 with HTTP; Sat, 6 Jul 2013 18:20:20 -0700 (PDT)
In-Reply-To: <00d701ce7aa6$cc5fe700$651fb500$@augustcellars.com>
References: <B86E1D4B-1DC8-4AD6-B8B3-E989599E0537@vpnc.org> <CAK3OfOj3MNNhjwo2bMa5CgoqynzMRVvviBXC8szxt5D17Z7FDg@mail.gmail.com> <51D3C63C.5030703@cisco.com> <51D48023.1020008@qti.qualcomm.com> <20130703201143.GL32044@mercury.ccil.org> <00cd01ce7a9f$19adeaa0$4d09bfe0$@augustcellars.com> <00d701ce7aa6$cc5fe700$651fb500$@augustcellars.com>
Date: Sat, 06 Jul 2013 20:20:20 -0500
Message-ID: <CAK3OfOiWrWCvNQneokyycV1Jb98M=UR-U7z0dhxUjzVdf+PwDw@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: json@ietf.org
Content-Type: text/plain; charset="UTF-8"
Cc: Jim Schaad <ietf@augustcellars.com>
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: Sun, 07 Jul 2013 01:20:28 -0000

On Sat, Jul 6, 2013 at 7:13 PM, Jim Schaad <ietf@augustcellars.com> wrote:
> Tim is not the only person saying this.  The JOSE working group has this as
> a requirement to be enforced in the documents it is producing.
> Specification that JOSE objects MUST fail validation if there are duplicate
> names in an object.

But does it follow (did you even mean to say) that since JOSE wants
requirement X (no dup names here) JSON should have it itself?

One might argue that otherwise JOSE implementations would have to use
JSON parsers that implement JOSE's requirement even though JSON
doesn't have the same requirement.  But then. JOSE implementations
also could use streaming JSON parsers and check for dup names
themselves.  So I don't think JOSE's requirement adds anything new to
the discussion.

We still need to decide (directly or indirectly) whether to impose dup
name checking on all JSON parsers, even minimal-state streaming
parsers, whether we want to impose a requirement on the parser and the
application (so we need not mention streaming), or on the parser if
it's not a streaming parser *and* the application if the parser is
streaming.

My view (for whatever it counts) is that we don't have consensus [yet]
for imposing a requirement on parsers to reject objects with dup
names.  We've had at least a number of examples of streaming parsers
that cannot implement such a requirement -- the whole point of
streaming being nullified by state-keeping requirements like this one.
 So we'd have to explicitly decide that we don't want to allow minimal
state streaming parsers.  Might as well call for consensus on that.

Nico
--