Re: draft-ietf-appsawg-json-pointer-07 - array index for end ofarray
Bill McQuillan <McQuilWP@pobox.com> Tue, 18 December 2012 00:55 UTC
Return-Path: <McQuilWP@pobox.com>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B6E8F21E8037 for <ietf@ietfa.amsl.com>; Mon, 17 Dec 2012 16:55:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gBKGc+ui88CJ for <ietf@ietfa.amsl.com>; Mon, 17 Dec 2012 16:55:41 -0800 (PST)
Received: from smtp.pobox.com (b-pb-sasl-quonix.pobox.com [208.72.237.35]) by ietfa.amsl.com (Postfix) with ESMTP id 9CE5221E804A for <ietf@ietf.org>; Mon, 17 Dec 2012 16:55:30 -0800 (PST)
Received: from smtp.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 33F05A46E; Mon, 17 Dec 2012 19:55:29 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from :message-id:to:cc:subject:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=sasl; bh=QmVVlyOffVWT GNlZZccT9EH25yU=; b=d5y1QFgGg5Jlmq6+xFilXb37mqAnIuiME97gDmwKs5y2 61FfecvsNSbygAOSxHgowCAAOGms8D28Fd0vMqB+afslzYnIjx3i98RBSE4a9wR9 PySYBWN1FoSoSN7Uc2NTPf2SWrh6GBHonEzrBJ3HV7QzNZnfeE8PdPv95UJSud0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=date:from :message-id:to:cc:subject:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=hgxlzp ezLO0UmqCIUvwrSvm5Bl+PSYqZHubtMVa7qW003oWow2fWd4kliY4DHEuvOtOZuc nAv3yuLNvD5Xh32GWk3oGADRXyJIjy52Cwq09YpdEy3UAJxU6kjrU4RZQgWBkga+ 0zA/M2jlB1TXtvg4TXxAN8AWZWEAx1SwOuigU=
Received: from b-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 21504A46C; Mon, 17 Dec 2012 19:55:29 -0500 (EST)
Received: from BQ07NB (unknown [68.107.15.47]) by b-sasl-quonix.pobox.com (Postfix) with ESMTPA id 40413A46B; Mon, 17 Dec 2012 19:55:28 -0500 (EST)
Date: Mon, 17 Dec 2012 16:55:26 -0800
From: Bill McQuillan <McQuilWP@pobox.com>
X-Priority: 3 (Normal)
Message-ID: <1128899190.20121217165526@pobox.com>
To: IETF Discussion <ietf@ietf.org>
Subject: Re: draft-ietf-appsawg-json-pointer-07 - array index for end ofarray
In-Reply-To: <F341FF15-EE2B-4D36-A484-1D44FB7D16F4@mnot.net>
References: <6B4F2945-EC54-4171-92FF-3A88CEB27D23@mnot.net> <p1txrkkc9p.fsf@d72933.na.sas.com> <CAC4RtVDaxJRXw-LkEfot6gkJyDY9ncRdc9oD8WdNwMsi+20nQw@mail.gmail.com> <F341FF15-EE2B-4D36-A484-1D44FB7D16F4@mnot.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Pobox-Relay-ID: 9DBE5696-48AD-11E2-BA53-F0CE2E706CDE-02871704!b-pb-sasl-quonix.pobox.com
Cc: Barry Leiba <barryleiba@computer.org>, "David J. Biesack" <David.Biesack@sas.com>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 18 Dec 2012 00:55:45 -0000
ISTM that if the person constructing the pointer wants to append to an array and knows the size of the array (as pointed out in another thread) he should be able to use "/foo/<len>" where <len> is the index of the element just after the last existing one in the array. No need for "/foo/-" or any negative integers. The only requirement is to allow that one extra index to be used without error. On Mon, 2012-12-17, Mark Nottingham wrote: > I disagree. Adding a capability for other indices down the > road is NOT compatible for existing uses, so adding it will > cause confusion ("are you using the old JSON Pointer or the new one?") and interop problems. > IIRC the discussion in the WG went much along these lines, and > led to us explicitly choosing a single character, rather than a > misleading "-1" construct. I'd be more comfortable with > changing the character to something even further away, rather > than making this construct even more confusing. > The other way we could go would be to do full negative > indexing; we don't have any use cases for that, and it > increases complexity a bit, but at least it would be unsurprising. > On 18/12/2012, at 6:54 AM, Barry Leiba > <barryleiba@computer.org> wrote: >>>> This was discussed in the Working Group, but it wasn't felt that the added >>>> complexity was worth it; there's a strong feeling that this spec should be as >>>> simple as possible. >>> >>> Might I suggest, however, using -1 instead of "-" to refer to the last item in an >>> array, as this provides two benefits: >>> >>> 1) Allows for adding the complexity down the road in a compatible way, should >>> there be need >>> 2) Uniformity; i.e. always using integer values for referring to array elements. >> >> I have to say that this suggestion sounds very compelling to me, for >> both reasons. I know there's a bunch of running code out there, but >> this (and perhaps teasing apart the "add" and "insert" concepts into >> separate verbs) seems worth the bother. >> >> Barry, as participant > -- > Mark Nottingham http://www.mnot.net/ -- Bill McQuillan <McQuilWP@pobox.com>
- draft-ietf-appsawg-json-pointer-07 - array index … David J. Biesack
- Re: draft-ietf-appsawg-json-pointer-07 - array in… Mark Nottingham
- Re: draft-ietf-appsawg-json-pointer-07 - array in… David J. Biesack
- Re: draft-ietf-appsawg-json-pointer-07 - array in… Barry Leiba
- Re: draft-ietf-appsawg-json-pointer-07 - array in… Martin Thomson
- Re: draft-ietf-appsawg-json-pointer-07 - array in… Mark Nottingham
- Re: draft-ietf-appsawg-json-pointer-07 - array in… Bill McQuillan