Skip to content
uencoder

JSON Merge Patch

JSON Merge Patch (RFC 7396) describes JSON updates with merge semantics: patch fields overwrite same-named target fields, and null deletes a field.

Purpose

To provide simpler merge-update semantics than JSON Patch for plain overwrite scenarios that need no move/copy.

Mechanism

Recursive merge: fields in the patch overwrite same-named target fields; a null patch field deletes the target field; when both patch and target are objects they merge recursively, otherwise the patch replaces the target.

Use cases

  • HTTP MERGE requests
  • Simple JSON updates
  • Configuration overrides

Related tools

References