Re: [apps-discuss] JSON Patch

"Martin J. Dürst" <duerst@it.aoyama.ac.jp> Thu, 24 November 2011 07:16 UTC

Return-Path: <duerst@it.aoyama.ac.jp>
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 997071F0C4F for <apps-discuss@ietfa.amsl.com>; Wed, 23 Nov 2011 23:16:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -99.726
X-Spam-Level:
X-Spam-Status: No, score=-99.726 tagged_above=-999 required=5 tests=[AWL=0.064, BAYES_00=-2.599, HELO_EQ_JP=1.244, HOST_EQ_JP=1.265, 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 4Ux-PGmsVicp for <apps-discuss@ietfa.amsl.com>; Wed, 23 Nov 2011 23:16:10 -0800 (PST)
Received: from scintmta02.scbb.aoyama.ac.jp (scintmta02.scbb.aoyama.ac.jp [133.2.253.34]) by ietfa.amsl.com (Postfix) with ESMTP id EC0DE1F0C49 for <apps-discuss@ietf.org>; Wed, 23 Nov 2011 23:16:02 -0800 (PST)
Received: from scmse02.scbb.aoyama.ac.jp ([133.2.253.231]) by scintmta02.scbb.aoyama.ac.jp (secret/secret) with SMTP id pAO7G2At032417 for <apps-discuss@ietf.org>; Thu, 24 Nov 2011 16:16:02 +0900
Received: from (unknown [133.2.206.133]) by scmse02.scbb.aoyama.ac.jp with smtp id 6715_5950_2a79f9c0_166c_11e1_afe4_001d096c5782; Thu, 24 Nov 2011 16:16:02 +0900
Received: from [IPv6:::1] ([133.2.210.1]:49012) by itmail.it.aoyama.ac.jp with [XMail 1.22 ESMTP Server] id <S157190F> for <apps-discuss@ietf.org> from <duerst@it.aoyama.ac.jp>; Thu, 24 Nov 2011 16:16:05 +0900
Message-ID: <4ECDEF31.9040801@it.aoyama.ac.jp>
Date: Thu, 24 Nov 2011 16:16:01 +0900
From: =?UTF-8?B?Ik1hcnRpbiBKLiBEw7xyc3Qi?= <duerst@it.aoyama.ac.jp>
Organization: Aoyama Gakuin University
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100722 Eudora/3.0.4
MIME-Version: 1.0
To: Martin Thomson <martin.thomson@gmail.com>
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>
In-Reply-To: <CABkgnnUCbMR3YOSu8dBPnrLSukBjMsiCh_rex6ojLc-UgH86OQ@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
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 07:16:10 -0000

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?

Regards,    Martin.