Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The current approach to Delta report generation follows the JSON patch format to report the delta as described in RFC6902. A JSON Patch document represents an array of objects, where each object contains exactly one operation, path and associated values. The operation can have following values: add, remove, replace, move, copy and test. The path represents the JSON patrh and the values contain the difference in source and target values.

Example JSON Patch document, transferred in an HTTP PATCH request:

Code Block
titleSample JSON Patch document
collapsetrue
PATCH /my/data HTTP/1.1
   Host: example.org
   Content-Length: 326
   Content-Type: application/json-patch+json
   If-Match: "abc123"

   [
     { "op": "test", "path": "/a/b/c", "value": "foo" },
     { "op": "remove", "path": "/a/b/c" },
     { "op": "add", "path": "/a/b/c", "value": [ "foo", "bar" ] },
     { "op": "replace", "path": "/a/b/c", "value": 42 },
     { "op": "move", "from": "/a/b/c", "path": "/a/b/d" },
     { "op": "copy", "from": "/a/b/d", "path": "/a/b/e" }
   ]


RFC 9144 Overview and example of RESTCONF

...