What JSON Merge Patch is
A partial JSON document that describes an update
JSON Merge Patch represents changes using familiar JSON structure. Changed and added members carry their new values, while a member set to null requests removal. This makes object-focused API updates concise and readable.
RFC 7386 overview
Recursive object updates with whole-value replacement
RFC 7386 defines how a processor merges an object-shaped patch into a target document. Nested objects are processed recursively. Arrays and other non-object values replace the target value completely. Because null means removal inside an object, it cannot create or preserve a null-valued member.
Merge Patch vs JSON Patch
Choose document-shaped updates or ordered operations
Merge Patch is often easier to read for conventional object updates. JSON Patch uses RFC 6902 operation arrays and RFC 6901 paths, making it better when operation order, tests, or individual array positions matter. Confirm which media type and patch format the receiving API supports.
API update workflows
Generate a focused request body from before and after data
- Create an
application/merge-patch+jsonbody - Review configuration changes before deployment
- Document optional API field updates
- Build concise fixtures for integration tests
- Compare saved resource snapshots
- Share a readable change document in code review
Example
Change one value, remove one setting, and add one property
| Document | JSON |
|---|---|
| Original | {"version":1,"debug":true} |
| Modified | {"version":2,"public":true} |
| Merge Patch | {"version":2,"debug":null,"public":true} |
Data Toolkit
Continue with every UtilityDock data workflow
FAQ
Questions about JSON Merge Patch
Does UtilityDock upload either JSON document?
No. Your files never leave your computer. Parsing, validation, comparison, generation, preview, copying, and download creation all happen locally inside your browser.
What does an RFC 7386 Merge Patch contain?
It is a JSON value that mirrors the structure being updated. Object members contain changed values, null removes an object member, and arrays or non-object values replace the existing value as a whole.
Can a Merge Patch set an object property to null?
No. RFC 7386 uses null to remove an object member. UtilityDock warns when the modified document contains a new or changed null-valued property that a Merge Patch cannot preserve.
How is JSON Merge Patch different from JSON Patch?
Merge Patch uses a partial JSON document and is concise for object updates. JSON Patch uses an ordered RFC 6902 operation array with precise JSON Pointer paths and can address array positions.
Can this utility apply the generated Merge Patch?
No. Version 1 generates, previews, copies, and downloads RFC 7386 documents. It does not apply patches, perform three-way merges, or edit generated output.