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

John Cowan <cowan@mercury.ccil.org> Thu, 04 July 2013 03:27 UTC

Return-Path: <cowan@ccil.org>
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 4339E11E8104 for <json@ietfa.amsl.com>; Wed, 3 Jul 2013 20:27:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.581
X-Spam-Level:
X-Spam-Status: No, score=-3.581 tagged_above=-999 required=5 tests=[AWL=0.018, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-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 3atW1irUig2G for <json@ietfa.amsl.com>; Wed, 3 Jul 2013 20:27:05 -0700 (PDT)
Received: from earth.ccil.org (earth.ccil.org [192.190.237.11]) by ietfa.amsl.com (Postfix) with ESMTP id B39D921F99D9 for <json@ietf.org>; Wed, 3 Jul 2013 20:27:04 -0700 (PDT)
Received: from cowan by earth.ccil.org with local (Exim 4.72) (envelope-from <cowan@ccil.org>) id 1UuaCD-0000ib-7H; Wed, 03 Jul 2013 23:27:01 -0400
Date: Wed, 03 Jul 2013 23:27:01 -0400
From: John Cowan <cowan@mercury.ccil.org>
To: Tatu Saloranta <tsaloranta@gmail.com>
Message-ID: <20130704032700.GB14538@mercury.ccil.org>
References: <B86E1D4B-1DC8-4AD6-B8B3-E989599E0537@vpnc.org> <CAK3OfOj3MNNhjwo2bMa5CgoqynzMRVvviBXC8szxt5D17Z7FDg@mail.gmail.com> <51D3C63C.5030703@cisco.com> <CAK3OfOg5ErNO5zozaCB-qchSaUb-dy4Da5b1KKJNTM0Bnpm+1A@mail.gmail.com> <51D3CB52.7040902@cisco.com> <CAGrxA26YcCCS6yE6DfEXgJs=nVZCW7fh5H+FSvRCspj65oH9ew@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CAGrxA26YcCCS6yE6DfEXgJs=nVZCW7fh5H+FSvRCspj65oH9ew@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: John Cowan <cowan@ccil.org>
Cc: Nico Williams <nico@cryptonector.com>, Paul Hoffman <paul.hoffman@vpnc.org>, Eliot Lear <lear@cisco.com>, "json@ietf.org WG" <json@ietf.org>
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: Thu, 04 Jul 2013 03:27:09 -0000

Tatu Saloranta scripsit:

> There is difference between retaining parent path (names of "open" Object
> properties), and retaining names of all preceding siblings. 

Indeed, you need to hold the names not only of preceding siblings, but of
preceding siblings of all ancestral objects as well, though only the former
are searched for conflicts.

> Former is indeed done by parsers that try to give useful error information
> with respect to nesting problems and such.

No doubt, but nobody is going to *mandate* good error messages: that is QOI,
and in some implementations (space constrained) you don't even want them.

-- 
But the next day there came no dawn,            John Cowan
and the Grey Company passed on into the         cowan@ccil.org
darkness of the Storm of Mordor and were        http://www.ccil.org/~cowan
lost to mortal sight; but the Dead
followed them.          --"The Passing of the Grey Company"