Re: [Json] The names within an object SHOULD be unique.

Stephen Dolan <stephen.dolan@cl.cam.ac.uk> Tue, 11 June 2013 10:52 UTC

Return-Path: <stedolan@stedolan.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 81E4321F9622 for <json@ietfa.amsl.com>; Tue, 11 Jun 2013 03:52:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.53
X-Spam-Level:
X-Spam-Status: No, score=-0.53 tagged_above=-999 required=5 tests=[AWL=-0.104, BAYES_00=-2.599, FH_RELAY_NODNS=1.451, FM_FORGED_GMAIL=0.622, RDNS_NONE=0.1]
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 wiTo3h+XPrGL for <json@ietfa.amsl.com>; Tue, 11 Jun 2013 03:51:56 -0700 (PDT)
Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::22e]) by ietfa.amsl.com (Postfix) with ESMTP id 2BA0021F90CD for <json@ietf.org>; Tue, 11 Jun 2013 03:51:55 -0700 (PDT)
Received: by mail-la0-f46.google.com with SMTP id eg20so6626385lab.5 for <json@ietf.org>; Tue, 11 Jun 2013 03:51:55 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=YAFC+dt+oOkb7IqLH5wXowMU5OWq2NDObjWBIBqiQhs=; b=Ig3D+a8TxO8KTwEqKo5rAzPkbLexR2Zf+aPjEqJnDNtHremHnKL68LQ1k02JV93Bpe Gq60x+b17HoDuaWcFIHNnHWsuueq92q5UN0h6GCjohQZQlxMWtVisOX5AJ3O2X/jKC6c UHHNxyxR3Jy5ZhDpm3WMtlNMCZLXsZhjw+GzT50xiMrBKLRfS/GzgcUzEWfeMx96uGU8 7mfSqMRqkwFBVSeswGvNsVSBSVXGllQ4Fwf5zQS41hlKXx93yrjkE8XEiH1RQedf0uQr ZiozlC3vIoSsOKfRfsMsq03jMcD/h24zLhOKO5/gWKWFcAArcHlAhtFHzq6it6WOKmGJ Ld7A==
MIME-Version: 1.0
X-Received: by 10.112.140.166 with SMTP id rh6mr8401806lbb.44.1370947914765; Tue, 11 Jun 2013 03:51:54 -0700 (PDT)
Sender: stedolan@stedolan.net
Received: by 10.114.176.231 with HTTP; Tue, 11 Jun 2013 03:51:54 -0700 (PDT)
X-Originating-IP: [131.111.184.26]
In-Reply-To: <20130610234101.73051.qmail@joyce.lan>
References: <CA+mHimNh26EUy4OxV1oSLNKvuz3VAsJjdte5ZFriTMc5HU9dRA@mail.gmail.com> <20130610234101.73051.qmail@joyce.lan>
Date: Tue, 11 Jun 2013 11:51:54 +0100
X-Google-Sender-Auth: m9S9i1kxZ4YlZw7sU1ZthHRyMx4
Message-ID: <CA+mHimM5zuBiw8dW07z=AMGyh3cEqfshvXBgbKr2UY-wvSS0sg@mail.gmail.com>
From: Stephen Dolan <stephen.dolan@cl.cam.ac.uk>
To: John Levine <johnl@taugh.com>
Content-Type: text/plain; charset="ISO-8859-1"
X-Gm-Message-State: ALoCoQlF5YARa94Rk3PvNAhLAEifYKXBG6/l2H8vf4qO5jFc2mmH93UkTk2rCY8YQf8f4gnokkx8
Cc: "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] The names within an object SHOULD be unique.
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: Tue, 11 Jun 2013 10:52:01 -0000

On Tue, Jun 11, 2013 at 12:41 AM, John Levine <johnl@taugh.com> wrote:
>>I propose that it be invalid to consider that document
>>indistinguishable from {a: true}. Parsers are free to accept or reject
>>it, and if they accept it they are free to return either one or two
>>"a" entries, but if they only return one it must be {a: false}.
>
> That would rule out streaming parsers, or at least require that a
> parser have access to arbitrarily large storage to buffer up large
> JSON objects, or store all of the names or hash them or otherwise add
> signficant processing that existing streaming parsers don't do.  Given
> that their current behavior is presumably adequate for their current
> applications, it seems unlikely that the programmers will add all that
> extra code just because we say to.

No, it wouldn't. Streaming parsers return both entries.

Stephen