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

From: "David J. Biesack" <[email-masked]>
Date: Fri, 14 Dec 2012 12:34:14 -0500

"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

---

From: Mark Nottingham <[email-masked]>
Date: Wed, 19 Dec 2012 14:19:06 +1100

In SVN; thanks.

--
Mark Nottingham   http://www.mnot.net/