Skip to content
uencoder

JSON Patch

JSON Patch (RFC 6902) describes document differences as an array of operations (add/remove/replace/move/copy/test), enabling atomic partial updates.

Purpose

To express changes to a JSON document in a standard format for PATCH requests, collaborative editing, and state synchronization.

Mechanism

A patch is an array of operations, each with op, path (a JSON Pointer), and value/from. Operations apply in order: add inserts, remove deletes, replace overwrites, move/copy transfer, and test asserts.

Use cases

  • HTTP PATCH requests
  • Real-time collaborative editing
  • JSON state synchronization

Related tools

References