JSON patch diff

json-patch-diff · version 1.0.0 · JSON & JSONL · free, no key needed

Generate a deterministic RFC 6902 patch from two JSON documents; returns the ordered patch operations.

Use when you need to: generate a JSON patch between documents · diff two JSON values as RFC 6902 · create patch operations to transform JSON.

Decide before calling

Read the versioned contract and the supported scope below. Reuse json-patch-diff@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use json-patch-diff@1.0.0 for generate a JSON patch between documents. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "source": {
    "a": 1
  },
  "target": {
    "a": 2
  }
}

Response:

{
  "result": {
    "standard_version": "RFC 6902 (April 2013); RFC 6901 (April 2013)",
    "patch": [
      {
        "op": "replace",
        "path": "/a",
        "value": 2
      }
    ]
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "json-patch-diff",
  "version": "1.0.0",
  "input": {
    "source": {
      "a": 1
    },
    "target": {
      "a": 2
    }
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/json-patch-diff/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"source":{"a":1},"target":{"a":2}}'

The machine-readable contract is at /v1/tools/json-patch-diff/versions/1.0.0.

CLI

node cli.mjs run json-patch-diff 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.