JSON Merge Patch: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 10: Line 10:


JSON merge patch defines a JSON document format appropriate for modifying a target JSON document. The format is suitable to use with the [[HTTP_Request#PATCH|HTTP PATCH]] method and an "application/merge-patch+json" media type.
JSON merge patch defines a JSON document format appropriate for modifying a target JSON document. The format is suitable to use with the [[HTTP_Request#PATCH|HTTP PATCH]] method and an "application/merge-patch+json" media type.
<syntaxhighlight lang='text'>
PATCH /target HTTP/1.1
Host: example.org
Content-Type: application/merge-patch+json
{
  "a":"z",
  "c": {
"f": null
  }
}
</syntaxhighlight>
=Also See=
=Also See=
{{Internal|JSON Patch|JSON Patch}}{{Internal|Kubernetes Strategic Merge Patch|Kubernetes Strategic Merge Patch}}
{{Internal|JSON Patch|JSON Patch}}{{Internal|Kubernetes Strategic Merge Patch|Kubernetes Strategic Merge Patch}}

Revision as of 19:06, 29 July 2021

External

Internal

Overview

JSON merge patch is defined by RFC7386.

JSON merge patch defines a JSON document format appropriate for modifying a target JSON document. The format is suitable to use with the HTTP PATCH method and an "application/merge-patch+json" media type.

PATCH /target HTTP/1.1
Host: example.org
Content-Type: application/merge-patch+json

{
  "a":"z",
  "c": {
 "f": null
   }
}

Also See

JSON Patch
Kubernetes Strategic Merge Patch