Re: Last Call: <draft-ietf-appsawg-json-patch-08.txt> (JSON Patch) to Proposed Standard

"David J. Biesack" <David.Biesack@sas.com> Fri, 14 December 2012 17:34 UTC

Return-Path: <David.Biesack@sas.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 33EEC21F8A75 for <ietf@ietfa.amsl.com>; Fri, 14 Dec 2012 09:34:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.697
X-Spam-Level:
X-Spam-Status: No, score=-3.697 tagged_above=-999 required=5 tests=[AWL=-0.098, BAYES_00=-2.599, 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 KMzl61ydXQgC for <ietf@ietfa.amsl.com>; Fri, 14 Dec 2012 09:34:22 -0800 (PST)
Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe006.messaging.microsoft.com [216.32.181.186]) by ietfa.amsl.com (Postfix) with ESMTP id 8117F21F8A6B for <ietf@ietf.org>; Fri, 14 Dec 2012 09:34:22 -0800 (PST)
Received: from mail218-ch1-R.bigfish.com (10.43.68.251) by CH1EHSOBE004.bigfish.com (10.43.70.54) with Microsoft SMTP Server id 14.1.225.23; Fri, 14 Dec 2012 17:34:21 +0000
Received: from mail218-ch1 (localhost [127.0.0.1]) by mail218-ch1-R.bigfish.com (Postfix) with ESMTP id BFA943002B0 for <ietf@ietf.org>; Fri, 14 Dec 2012 17:34:21 +0000 (UTC)
X-Forefront-Antispam-Report: CIP:149.173.6.148; KIP:(null); UIP:(null); IPV:NLI; H:mercav06d.na.sas.com; RD:mercav06d.na.sas.com; EFVD:NLI
X-SpamScore: 0
X-BigFish: S0(zzzz1de0h1202h1e76h1d1ah1d2ahzz18602eh8275bhz2fh2a8h668h839h944hcf6hd24hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh162dh1631h1758h1155h)
Received-SPF: pass (mail218-ch1: domain of sas.com designates 149.173.6.148 as permitted sender) client-ip=149.173.6.148; envelope-from=David.Biesack@sas.com; helo=mercav06d.na.sas.com ; d.na.sas.com ;
Received: from mail218-ch1 (localhost.localdomain [127.0.0.1]) by mail218-ch1 (MessageSwitch) id 1355506459672287_18574; Fri, 14 Dec 2012 17:34:19 +0000 (UTC)
Received: from CH1EHSMHS031.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.243]) by mail218-ch1.bigfish.com (Postfix) with ESMTP id 98046220149 for <ietf@ietf.org>; Fri, 14 Dec 2012 17:34:19 +0000 (UTC)
Received: from mercav06d.na.sas.com (149.173.6.148) by CH1EHSMHS031.bigfish.com (10.43.70.31) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 14 Dec 2012 17:34:19 +0000
X-TM-IMSS-Message-ID: <95f13603001e1b70@mercav06d.na.sas.com>
Received: from d72933.na.sas.com.na.sas.com ([10.23.16.81]) by mercav06d.na.sas.com ([10.36.10.11]) with ESMTP (TREND IMSS SMTP Service 7.1) id 95f13603001e1b70 ; Fri, 14 Dec 2012 12:34:17 -0500
From: "David J. Biesack" <David.Biesack@sas.com>
To: ietf@ietf.org
Subject: Re: Last Call: <draft-ietf-appsawg-json-patch-08.txt> (JSON Patch) to Proposed Standard
Date: Fri, 14 Dec 2012 12:34:14 -0500
Message-ID: <p1pq2cleqx.fsf@d72933.na.sas.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-OriginatorOrg: 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: Fri, 14 Dec 2012 18:17:20 -0000

"4.4.  move" states

   The target location MUST NOT be part of the location defined by
   "from"; i.e., a location cannot be moved into one of its children.

This constraint is backwards. I.e. to disallow moving into a child, 

 { "op": "move", "from": "/a/b/c", "path": "/a/b/c/d" }

this should read:

   The "from" location MUST NOT be a proper prefix of the "path" location;
   i.e., a location cannot be moved into one of its children.

I suggest using "proper prefix" instead of just "part of". For example,
"/a/b/c" is "part of" "q/a/b/c" but such a move should be allowed
because it is not a proper prefix.

As currently stated, moving a value UP would be disallowed. Below, the target location is part of the "from" :

 { "op": "move", "from": "/a/b/c/d", "path": "/a/b/c" }

-- 
David J. Biesack | Principal API Architect, SAS | @davidbiesack | 919-531-7771 | www.sas.com