JSON Merge Patch (RFC 7396)
Apply a JSON Merge Patch (RFC 7396) — the dead-simple alternative to RFC 6902 JSON Patch. A merge patch is just a JSON object: each property in the patch replaces (or recursively merges into) the corresponding property in the target. Set a property to null to delete it. Used by GitHub's API, Kubernetes's strategic merge patch, and many REST APIs.
How to use the JSON Merge Patch (RFC 7396)
Paste the original document on the left and the patch on the right. The applier walks both: scalar values in the patch overwrite; objects merge recursively; null values in the patch delete the corresponding property from the target. Arrays in the patch replace arrays in the target (no element-level merging).
About JSON Merge Patch (RFC 7396)
RFC 7396 JSON Merge Patch was designed to be the simplest possible patch format: a patch is itself a JSON document, and applying it follows three rules. (1) Object properties in the patch replace properties in the target (or merge if both are objects). (2) Properties with value null in the patch are removed from the target. (3) Anything else is a value replacement.
The trade-off vs RFC 6902 JSON Patch: merge patch can't describe array element changes (you always replace the whole array), can't move/copy values, and can't distinguish "set to null" from "delete". For most CRUD APIs, that's fine; for diff-style patches, use RFC 6902 (our JSON Patch builder).