Subject: [apps-discuss] [Errata Verified] RFC7386 (4132)

From: RFC Errata System <[email-masked]>
Date: Thu, 16 Oct 2014 07:56:31 -0700 (PDT)

The following errata report has been verified for RFC7386,
"JSON Merge Patch". 

--------------------------------------
You may review the report below and at:
http://www.rfc-editor.org/errata_search.php?rfc=7386&eid=4132

--------------------------------------
Status: Verified
Type: Technical

Reported by: Stéphane Bortzmeyer <[email-masked]>
Date Reported: 2014-10-15
Verified by: Barry Leiba (IESG)

Section: 2

Original Text
-------------
define MergePatch(Target, Patch):
       if Patch is an Object:
         if Target is not an Object:
       Target = {} # Ignore the contents and set it to an empty Object
         for each Name/Value pair in Patch:
       if Value is null:
         if Name exists in Target:
           remove the Name/Value pair from Target
       else:
         Target[Name] = MergePatch(Target[Name], Value)
         return Target
       else:
         return Patch

Corrected Text
--------------
   define MergePatch(Target, Patch):
     if Patch is an Object:
       if Target is not an Object:
         Target = {} # Ignore the contents and set it to an empty Object
       for each Name/Value pair in Patch:
         if Value is null:
           if Name exists in Target:
             remove the Name/Value pair from Target
         else:
           Target[Name] = MergePatch(Target[Name], Value)
       return Target
     else:
       return Patch

Notes
-----
Indentation of the pseudo-code example was correct in the Internet-Drafts but was messed up in the final version. For instance, "Target = {}" should be under the two ifs. (Reported by James H. Manger on the appsawg mailing list.)

This is a technical erratum, rather than editorial, because the correct indentation is essential to understanding the pseudocode.

--------------------------------------
RFC7386 (draft-ietf-appsawg-json-merge-patch-07)
--------------------------------------
Title               : JSON Merge Patch
Publication Date    : October 2014
Author(s)           : P. Hoffman, J. Snell
Category            : PROPOSED STANDARD
Source              : Applications Area Working Group
Area                : Applications
Stream              : IETF
Verifying Party     : IESG