errata logo graphic

Found 1 record.

Status: Reported (1)

RFC6902, "JavaScript Object Notation (JSON) Patch", April 2013

Source of RFC: appsawg (app)

Errata ID: 4419

Status: Reported
Type: Technical

Reported By: Brett Zamir
Date Reported: 2015-07-17

Section A.14 says:

An example target JSON document:

   {
     "/": 9,
     "~1": 10
   }

   A JSON Patch document:

   [
     {"op": "test", "path": "/~01", "value": 10}
   ]

   The resulting JSON document:

   {
     "/": 9,
     "~1": 10
   }

It should say:

Proper JSON Pointer escaping should occur when resolving
paths for application to the target document.

An example target JSON document:

   {
     "/": 9,
     "~1": 10
   }

   A JSON Patch document:

   [
     {"op": "add", "path": "/~01", "value": 11}
   ]

   The resulting JSON document:

   {
     "/": 9,
     "~1": 11
   }

Notes:

At http://tools.ietf.org/html/rfc6902#appendix-A.14 , I have a few issues:

1. Even though JSON Pointer is referenced elsewhere, I think reference ought to be made here to JSON Pointer in order to clarify what meaning "escape ordering" has here.
2. The operation indicated in this section is "test" which is not documented in its respective sections as returning any kind of document at all. I believe "add" or "replace" must have been the intended operation instead. And to make clear that the value of key "~1" would have actually been affected by such a modifying operation, the value in the result ought to differ from that in the original document.


Report New Errata