Re: [apps-discuss] JSON Patch

Julian Reschke <julian.reschke@gmx.de> Thu, 24 November 2011 08:45 UTC

Return-Path: <julian.reschke@gmx.de>
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 B340F21F8B3C for <apps-discuss@ietfa.amsl.com>; Thu, 24 Nov 2011 00:45:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.162
X-Spam-Level:
X-Spam-Status: No, score=-104.162 tagged_above=-999 required=5 tests=[AWL=-1.863, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, USER_IN_WHITELIST=-100]
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 FMrVQPnF59bD for <apps-discuss@ietfa.amsl.com>; Thu, 24 Nov 2011 00:45:13 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id BE7BA21F8B36 for <apps-discuss@ietf.org>; Thu, 24 Nov 2011 00:45:12 -0800 (PST)
Received: (qmail invoked by alias); 24 Nov 2011 08:45:08 -0000
Received: from p5DCC3232.dip.t-dialin.net (EHLO [192.168.178.36]) [93.204.50.50] by mail.gmx.net (mp072) with SMTP; 24 Nov 2011 09:45:08 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX19v3+VmA7pvp02uaIOjFz7XXkeWC0STficBssOX6i rynkD0bc6drDsX
Message-ID: <4ECE0405.9050103@gmx.de>
Date: Thu, 24 Nov 2011 09:44:53 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: "\"Martin J. Dürst\"" <duerst@it.aoyama.ac.jp>
References: <4EB1482E.1040600@adobe.com> <4EB14C2E.8040208@gmx.de> <1320254564.2622.37.camel@neutron> <4EBBA0DD.9020605@gmx.de> <4ECBC843.60900@gmx.de> <CABkgnnUCbMR3YOSu8dBPnrLSukBjMsiCh_rex6ojLc-UgH86OQ@mail.gmail.com> <4ECDEF31.9040801@it.aoyama.ac.jp>
In-Reply-To: <4ECDEF31.9040801@it.aoyama.ac.jp>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: apps-discuss@ietf.org
Subject: Re: [apps-discuss] JSON Patch
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, 24 Nov 2011 08:45:13 -0000

On 2011-11-24 08:16, "Martin J. Dürst" wrote:
>
>
> On 2011/11/24 11:03, Martin Thomson wrote:
>> On 23 November 2011 03:05, Julian Reschke<julian.reschke@gmx.de> wrote:
>>> The "move" operation moves an existing array element. The "to" member
>>> indicates the array position as integer value. This operation is
>>> equivalent
>>> to removing the element identified by "move", an inserting it again
>>> at the
>>> position "to".
>>> A JSON Patch document:
>>>
>>> [
>>> { "move": "/foo/1", "to": 2}
>>> ]
>>
>> A thought occurred. What about this?
>>
>> [
>> { "move" : "/foo/1", "to": "/foo/2" }
>> ]
>
> The syntax looks good. But what is /foo/2 in the "to" part exactly
> referring to? Is is array position 2 after /foo/1 has been removed? Or
> before?

*After*. See the definition.

Best regards, Julian