Data & Requests · LOCAL TOOL

JSON Patch Rehearsal

Apply add, remove, replace, move, copy, and test operations to a local copy of a JSON document. Review the resulting document and the operation sequence without changing a source file.

Runs in this page
No API call
WORKSPACEINPUT → RESULT
01

Your input

LOCAL
JSON Patch Rehearsal inputs
02

Result

Run the tool to see a result.

Your result will appear here. Input is not saved.

Browser-side processingNothing is sent to a tool API.

WHY THIS TOOL EXISTS

A focused job, not a black box.

The rehearsal checks pointer escapes, array bounds, missing targets, and failed tests. A failure reports its step and publishes no partial result, which helps review a migration before it is run elsewhere.

How to use it

  1. Paste the original document and a JSON Patch operation array.
  2. Run the rehearsal and inspect each applied path.
  3. If a step fails, correct the patch and rerun against the original document.

TRY A WORKING EXAMPLE

Start with known input.

Load this sample into the workspace, run the tool, and compare the result shown below.

Show sample input
{
  "source": "{\"tags\":[\"draft\"],\"status\":\"draft\"}",
  "patch": "[{\"op\":\"test\",\"path\":\"/status\",\"value\":\"draft\"},{\"op\":\"replace\",\"path\":\"/status\",\"value\":\"ready\"},{\"op\":\"add\",\"path\":\"/tags/-\",\"value\":\"reviewed\"}]"
}

Expected sample result from the local tool

3 operation(s) applied in rehearsal.

{
  "document": {
    "tags": [
      "draft",
      "reviewed"
    ],
    "status": "ready"
  },
  "steps": [
    {
      "step": 1,
      "op": "test",
      "path": "/status",
      "status": "applied"
    },
    {
      "step": 2,
      "op": "replace",
      "path": "/status",
      "status": "applied"
    },
    {
      "step": 3,
      "op": "add",
      "path": "/tags/-",
      "status": "applied"
    }
  ]
}

LIMITS AND INTERPRETATION

What the result cannot tell you.

RFC 6902-style operations with JSON Pointer paths. Removing the whole document root is deliberately unsupported. Maximum 1000 operations; input and result sizes are bounded. No server or source file is changed.

Inputs are processed in this page and are not written to local storage.

Reference for this model

Read the standard alongside the supported scope above.