Re: [apps-discuss] JSON Patch

Tony Hansen <tony@att.com> Thu, 24 November 2011 02:19 UTC

Return-Path: <tony@att.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 77D7611E80A4 for <apps-discuss@ietfa.amsl.com>; Wed, 23 Nov 2011 18:19:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.171
X-Spam-Level:
X-Spam-Status: No, score=-106.171 tagged_above=-999 required=5 tests=[AWL=0.428, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, 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 gSJDj65C+ksY for <apps-discuss@ietfa.amsl.com>; Wed, 23 Nov 2011 18:19:30 -0800 (PST)
Received: from mail119.messagelabs.com (mail119.messagelabs.com [216.82.241.195]) by ietfa.amsl.com (Postfix) with ESMTP id CE1C711E8098 for <apps-discuss@ietf.org>; Wed, 23 Nov 2011 18:19:29 -0800 (PST)
X-Env-Sender: tony@att.com
X-Msg-Ref: server-9.tower-119.messagelabs.com!1322101167!2588382!1
X-Originating-IP: [144.160.20.145]
X-StarScan-Version: 6.3.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20055 invoked from network); 24 Nov 2011 02:19:27 -0000
Received: from sbcsmtp6.sbc.com (HELO mlpd192.enaf.sfdc.sbc.com) (144.160.20.145) by server-9.tower-119.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 24 Nov 2011 02:19:27 -0000
Received: from enaf.sfdc.sbc.com (localhost.localdomain [127.0.0.1]) by mlpd192.enaf.sfdc.sbc.com (8.14.4/8.14.4) with ESMTP id pAO2JtOG013125 for <apps-discuss@ietf.org>; Wed, 23 Nov 2011 21:19:55 -0500
Received: from alpd052.aldc.att.com (alpd052.aldc.att.com [130.8.42.31]) by mlpd192.enaf.sfdc.sbc.com (8.14.4/8.14.4) with ESMTP id pAO2JnZn012841 for <apps-discuss@ietf.org>; Wed, 23 Nov 2011 21:19:50 -0500
Received: from aldc.att.com (localhost.localdomain [127.0.0.1]) by alpd052.aldc.att.com (8.14.4/8.14.4) with ESMTP id pAO2JKYm006175 for <apps-discuss@ietf.org>; Wed, 23 Nov 2011 21:19:20 -0500
Received: from mailgw1.maillennium.att.com (dns.maillennium.att.com [135.25.114.99]) by alpd052.aldc.att.com (8.14.4/8.14.4) with ESMTP id pAO2JFOH005918 for <apps-discuss@ietf.org>; Wed, 23 Nov 2011 21:19:15 -0500
Received: from [135.70.245.180] (vpn-135-70-245-180.vpn.east.att.com[135.70.245.180]) by maillennium.att.com (mailgw1) with ESMTP id <20111124021810gw100e4lu5e> (Authid: tony); Thu, 24 Nov 2011 02:18:10 +0000
X-Originating-IP: [135.70.245.180]
Message-ID: <4ECDA9A2.7010502@att.com>
Date: Wed, 23 Nov 2011 21:19:14 -0500
From: Tony Hansen <tony@att.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: apps-discuss@ietf.org
References: <4EB1482E.1040600@adobe.com> <4EB14C2E.8040208@gmx.de> <1320254564.2622.37.camel@neutron> <4EBBA0DD.9020605@gmx.de> <4ECBC843.60900@gmx.de> <1321986297.2091.1.camel@neutron> <4ECCE93C.406@gmx.de> <1322068744.6133.1.camel@neutron> <4ECD2F60.5080902@gmx.de> <1322071342.6133.14.camel@neutron> <4ECD3627.702@gmx.de>
In-Reply-To: <4ECD3627.702@gmx.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
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 02:19:30 -0000

On 11/23/2011 1:06 PM, Julian Reschke wrote:
> On 2011-11-23 19:02, Paul C. Bryan wrote:
>> On Wed, 2011-11-23 at 18:37 +0100, Julian Reschke wrote:
>>> On 2011-11-23 18:19, Paul C. Bryan wrote:
>>> >  I'm now inclined to simply make"to"  a JSON pointer as well.
>>> >  Semantically it's clear, It's easy to apply, and JSON diff
>>> >  implementations can be smart if they want and notice something moved
>>> >  from one node in the graph to another.
>>>
>>> +1, except that I'm not convinced that leaving this optional is a good
>>> idea...
>>
>> I'd say if JSON pointer is adopted for "to", it should only be JSON 
>> pointer.
>>
>> Paul
>
> Works for me.
>
> (What I had in mind was to consider something not starting with / as 
> relative pointer...)

If you introduce relative pointers, you also need the concept of .. to 
move up the path, and have to define semantics for moving past the 
beginning of the path, and the concept of normalizing a path, and 
probably a dozen other things that are normally part of relative pathing.

In thinking about the example, I find "/foo/2" much clearer than just 
"2" as the target.

Given that Javascript uses 0-based arrays, should we also be using 
0-based paths here? Or has that horse already left the barn?

     Tony Hansen