Re: [apps-discuss] Review of draft-ietf-appsawg-json-pointer

James M Snell <jasnell@gmail.com> Thu, 15 November 2012 17:41 UTC

Return-Path: <jasnell@gmail.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1BF9321F855F for <apps-discuss@ietfa.amsl.com>; Thu, 15 Nov 2012 09:41:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.867
X-Spam-Level:
X-Spam-Status: No, score=-3.867 tagged_above=-999 required=5 tests=[AWL=-0.269, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 AsWJcEuHTNKT for <apps-discuss@ietfa.amsl.com>; Thu, 15 Nov 2012 09:41:50 -0800 (PST)
Received: from mail-oa0-f44.google.com (mail-oa0-f44.google.com [209.85.219.44]) by ietfa.amsl.com (Postfix) with ESMTP id 96D6E21F84FC for <apps-discuss@ietf.org>; Thu, 15 Nov 2012 09:41:50 -0800 (PST)
Received: by mail-oa0-f44.google.com with SMTP id n5so2009353oag.31 for <apps-discuss@ietf.org>; Thu, 15 Nov 2012 09:41:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=GErnoKULlzgenBvCQflcWQqS1c79HHUpRSogq1QOFv0=; b=yxKQF1ZaN9nv6vN0cfBZ5RoA9SccAG4y9h2gdPWfrEhpT+vN9Drf56lDHuNTciy6Dm GTjz5Ry43plJbGagm+gxlgK3Z7eoYis6F49Suu1Ujj+wTcticVCoGMvb+U0HTDXCcw7K dzKvw4FxY5oO/SO7gmadeaUPTngSS7wQDtK5CTo9256RK0fCwFIqDBZnYAYGusGoWFvn GKIVjZmkmx6/QEXUhKEjG2BNvaTXDW9IS1Jmmpd+mCOAgDJep6YJnQyxxt4C8QwKSJWd LdaETN3T6HNboxh/WLam1d2Oar65CcNORrBGAXr0XXXG/RmjOtkvoNQ0ns2KL2o/kc+9 ZYDg==
Received: by 10.182.18.196 with SMTP id y4mr1543879obd.52.1353001310176; Thu, 15 Nov 2012 09:41:50 -0800 (PST)
MIME-Version: 1.0
Received: by 10.76.68.37 with HTTP; Thu, 15 Nov 2012 09:41:30 -0800 (PST)
In-Reply-To: <362546D9-85FF-4BE8-B0ED-99CB57A55379@vpnc.org>
References: <D8B6B887-7206-4197-B78D-7E2B38A20EF9@vpnc.org> <CABP7RbdkyCwvLDAJYMwPf-HCLtxKrM0ttS7h7PziFYDMVcv0ww@mail.gmail.com> <362546D9-85FF-4BE8-B0ED-99CB57A55379@vpnc.org>
From: James M Snell <jasnell@gmail.com>
Date: Thu, 15 Nov 2012 09:41:30 -0800
Message-ID: <CABP7RbeS9QdjgdCjX2auMWaY=YtY6XdM0By0Kj-33EkFbAiCEg@mail.gmail.com>
To: Paul Hoffman <paul.hoffman@vpnc.org>
Content-Type: multipart/alternative; boundary="f46d04388ef579443e04ce8c2a5e"
Cc: "apps-discuss@ietf.org Discuss" <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] Review of draft-ietf-appsawg-json-pointer
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Nov 2012 17:41:51 -0000

It's a zero-based array. With JSON patch, adding an item to the beginning
of the array would be done using {"op":"add", "path": "/a/b/0", "value":1},
which causes the new value to be inserted at position 0 and all existing
items to be shifted right.


On Thu, Nov 15, 2012 at 9:36 AM, Paul Hoffman <paul.hoffman@vpnc.org> wrote:

> On Nov 15, 2012, at 9:27 AM, James M Snell <jasnell@gmail.com> wrote:
>
> > This came from a requirement with json patch to allow a way of appending
> new array items to the end. This was fairly extensively discussed and
> concluded that the - was the least-complicated option that met the
> requirement.
>
> Understood. However, is there *no* reason to prepend something to the
> beginning of the list? Or is that done with "1"? (I admit not fully getting
> all the fun features of -patch).
>
> --Paul Hoffman