Free online RFC 6902 JSON Patch editor - add / remove / replace / move / copy / test operations
π Source JSON Document
β Patched Result
π οΈ Patch Operations
π JSON Patch Text (RFC 6902)
FAQ
Q1: What is JSON Patch?
JSON Patch is a standard format defined in RFC 6902 for describing changes to JSON documents. It uses atomic operations (add, remove, replace, move, copy, test) to precisely describe modifications, commonly used for partial updates in REST APIs (PATCH requests) instead of sending the full document.
Q2: How do I write JSON Pointer paths?
JSON Patch uses RFC 6901 JSON Pointer for element location. Paths start with /: root object is "", /name points to the name property, /skills/0 points to the first array element, /a/b points to nested properties. Special characters: ~ is escaped as ~0, / is escaped as ~1.
Q3: What is the test operation for?
The test operation verifies that a value at the specified path equals the given value. If values don't match, the entire patch fails and rolls back. This is useful for conditional updates β ensuring values match expectations before modifying, preventing concurrent modification issues.