Subject: Re: [Art] [Technical Errata Reported] RFC6902 (4787)

From: Mark Nottingham <[email-masked]>
Date: Fri, 2 Sep 2016 11:48:20 +1000

This isn't an errata; it would require gaining consensus and updating the document. See also: https://github.com/json-patch/json-patch2

REJECT or HOLD FOR DOCUMENT UPDATE, I think.

> On 26 Aug 2016, at 4:29 AM, RFC Errata System <[email-masked]> wrote:
> 
> The following errata report has been submitted for RFC6902,
> "JavaScript Object Notation (JSON) Patch".
> 
> --------------------------------------
> You may review the report below and at:
> http://www.rfc-editor.org/errata_search.php?rfc=6902&eid=4787
> 
> --------------------------------------
> Type: Technical
> Reported by: Daniel Frey <[email-masked]>
> 
> Section: 4.2
> 
> Original Text
> -------------
> The "remove" operation removes the value at the target location.
> 
> The target location MUST exist for the operation to be successful.
> 
> For example:
> 
> { "op": "remove", "path": "/a/b/c" }
> 
> If removing an element from an array, any elements above the
> specified index are shifted one position to the left.
> 
> 
> Corrected Text
> --------------
> The "remove" operation removes the value at the target location.
> 
> The target location MUST exist for the operation to be successful.
> 
> For example:
> 
> { "op": "remove", "path": "/a/b/c" }
> 
> If removing an element from an array, any elements above the
> specified index are shifted one position to the left.
> 
> The target location MUST NOT be a reference to the root. It is an
> error in this document:
> 
> { "op": "remove", "path": "" }
> 
> 
> Notes
> -----
> The semantics of { "op": "remove", "path": "" } are never specified. If we allow to remove the root element, what would the result be? It would no longer be a valid JSON document, hence I propose to explicitly require the path of the "remove" operation to not reference the root.
> 
> Instructions:
> -------------
> This erratum is currently posted as "Reported". If necessary, please
> use "Reply All" to discuss whether it should be verified or
> rejected. When a decision is reached, the verifying party (IESG)
> can log in to change the status and edit the report, if necessary. 
> 
> --------------------------------------
> RFC6902 (draft-ietf-appsawg-json-patch-10)
> --------------------------------------
> Title               : JavaScript Object Notation (JSON) Patch
> Publication Date    : April 2013
> Author(s)           : P. Bryan, Ed., M. Nottingham, Ed.
> Category            : PROPOSED STANDARD
> Source              : Applications Area Working Group APP
> Area                : Applications
> Stream              : IETF
> Verifying Party     : IESG
> 

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

---

From: [email-masked] (Dale R. Worley)
Date: Sun, 04 Sep 2016 22:10:59 -0400

Mark Nottingham <[email-masked]> writes:
> This isn't an errata; it would require gaining consensus and updating
> the document. See also: https://github.com/json-patch/json-patch2

I could be convinced that it's an erratum.  The problem is that the
definition of the remove operation makes no sense if it is applied to
the JSON document root:  RFC 4627 specifies that a JSON document is an
object or array; there is no "null document" that could be the result of
a remove-root operation.  Hence, it could be argued that RFC 6902
intended that the remove operation could not validly be applied to the
root location, and it was an editing mistake that the document doesn't
state that explicitly.

Dale

---

From: Dean Willis <[email-masked]>
Date: Tue, 6 Sep 2016 19:19:53 -0500

I concur with Mark.

On Sep 2, 2016 10:16 AM, "Mark Nottingham" <[email-masked]> wrote:

> This isn't an errata; it would require gaining consensus and updating the
> document. See also: https://github.com/json-patch/json-patch2
>
> > The semantics of { "op": "remove", "path": "" } are never specified. If
> we allow to remove the root element, what would the result be? It would no
> longer be a valid JSON document, hence I propose to explicitly require the
> path of the "remove" operation to not reference the root.
> >
> > Instructions:
> > -------------
> _______________________________________________
> Art mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/art
>