What is JSON Patch?
JSON Patch is a format for describing changes to aJSONdocument. It can be used to avoid sending a whole document when only a part has changed. When used in combination with theHTTP PATCH method, it allows partial updates for HTTP APIs in a standards compliant way.
The patch documents are themselves JSON documents.
JSON Patch is specified inRFC 6902from the IETF.
Simple example
The original document
{
"baz": "qux",
"foo": "bar"
}
The patch
[
{ "op": "replace", "path": "/baz", "value": "boo" },
{ "op": "add", "path": "/hello", "value": ["world"] },
{ "op": "remove", "path": "/foo" }
]
The result
{
"