Subject: [apps-discuss] [Technical Errata Reported] RFC6902 (4419)

From: RFC Errata System <[email-masked]>
Date: Fri, 17 Jul 2015 12:36:24 -0700 (PDT)

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=4419

--------------------------------------
Type: Technical
Reported by: Brett Zamir <[email-masked]>

Section: A.14

Original Text
-------------
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
   }

Corrected Text
--------------
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.

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

---

From: Mark Nottingham <[email-masked]>
Date: Mon, 20 Jul 2015 14:51:39 +0200

This seems reasonable to me, although it does seem more like a text improvement than a strict errata - Barry, any thoughts?

I've raised an issue here:
  https://github.com/json-patch/json-patch-tests/issues/22
… as that's where most of the JSON Patch implementer community pays attention.

Cheers,

> On 17 Jul 2015, at 9:36 pm, RFC Errata System <[email-masked]> wrote:
> 

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

---

From: "Manger, James" <[email-masked]>
Date: Tue, 21 Jul 2015 11:09:22 +1000

RFC6902 "JSON Patch" section A.14. "~ Escape Ordering" is correct, but could be worded more clearly.

Saying "The test succeeds" would make more sense than "The resulting JSON [is]". A.8, A.9, and A.15 are better worded with their use of "op":"test".

Compare A.14. to A.15. "Comparing Strings and Numbers". They both use "op":"test" with the same target and very similar patches. A.15 says "This results in an error, because the test fails". That contrasts well with A.14 were the test succeeds.

Perhaps a better editorial errata would be:

>   The test succeeds, as JSON Pointer escaping applies once to the "path" value.

--
James Manger

-----Original Message-----
From: apps-discuss [mailto:[email-masked]] On Behalf Of Mark Nottingham
Sent: Monday, 20 July 2015 10:52 PM
To: RFC Errata System
Cc: [email-masked]; [email-masked]; [email-masked]; [email-masked]
Subject: Re: [apps-discuss] [Technical Errata Reported] RFC6902 (4419)

Cheers,

> Proper JSON Pointer escaping should occur when resolving paths for 
> application to the target document.
> 
> 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.
> 

_______________________________________________
apps-discuss mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/apps-discuss

---

From: Barry Leiba <[email-masked]>
Date: Tue, 21 Jul 2015 10:25:50 -0400

> This seems reasonable to me, although it does seem more like a text
> improvement than a strict errata - Barry, any thoughts?

Was it an error in the spec that the example makes a patch that
doesn't actually make any change to the JSON?

If that was a mistake, then this report (or some edited version of it)
should be "verified".

If that was intentional, showing an example of a valid patch that
makes no changes, then this report should be "rejected".

In either case...

> … as that's where most of the JSON Patch implementer community

...that's a good thing to do, as that's the right place to record
comments about the clarity of the document, which might be considered
if we ever do another version.

Barry

---

From: Barry Leiba <[email-masked]>
Date: Tue, 21 Jul 2015 10:28:08 -0400

(Re-sending this with what I presume is the correct email address for Brett.)

In either case...

---

From: Mark Nottingham <[email-masked]>
Date: Tue, 21 Jul 2015 16:46:52 +0200

I think it's the case that it's a correct — but not necessarily the clearest — example.

> On 21 Jul 2015, at 4:28 pm, Barry Leiba <[email-masked]> wrote:
>