x402 Forge BundlesCatalog

Catalog / json-diff-patch

JSON diff and patch

Shows exactly what changed between two JSON documents as a standard JSON Patch, or applies such a patch to a document and says which step failed.

Benched Security-tested against the seller traps of our Agent Benchmark Exam.

Buy $1.00

What it does

mode=diff: compares JSON documents a and b and returns an RFC 6902 JSON Patch (add/remove/replace, RFC 6901 pointers) plus a change list with before/after types and scalar values; objects member by member, arrays by LCS between the common prefix and suffix (index by index above 250,000 cells). Every patch is applied to a fresh copy of a and checked to deep-equal b before it is returned (verified: true). ignore_keys leaves named members out at any depth. mode=apply: applies an RFC 6902 patch (add, remove, replace, move, copy, test) atomically and returns the document, or valid: false with the index and op of the failing operation and a snake_case reason.

Example input
{"mode":"diff","a":"{\"name\":\"Ada\",\"tags\":[\"x\",\"y\"],\"v\":1}","b":"{\"name\":\"Ada L.\",\"tags\":[\"x\",\"z\",\"y\"],\"active\":true}"}
Answer
{"ok":true,"result":{"valid":true,"reason":null,"mode":"diff","equal":false,"patch":[{"op":"replace","path":"/name","value":"Ada L."},{"op":"add","path":"/tags/1","value":"z"},{"op":"remove","path":"/v"},{"op":"add","path":"/active","value":true}],"op_count":4,"changes":[{"path":"/name","change":"replaced","before_type":"string","after_type":"string","before":"Ada","after":"Ada L."},{"path":"/tags/1","change":"added","before_type":"absent","after_type":"string","after":"z"},{"path":"/v","change":"removed","before_type":"number","after_type":"absent","before":1},{"path":"/active","change":"added","before_type":"absent","after_type":"boolean","after":true}],"changes_truncated":false,"ignored_keys":[],"arrays_by_index":0,"verified":true,"standard":"RFC 6902 JSON Patch, RFC 6901 JSON Pointer"},"warnings":[]}
Try it free
/try/json-diff-patch

Buy

Price $1.00, once. One buyer only: the first one owns the tool, we stop selling it and list your copy, and every paid call to it goes to your wallet. Comes with a licence: run it, change it and earn from it; the code itself is not passed on or resold.

  1. Pay with an x402 walletThe buy link is https://forge.fizzl.eu/forge/packages/json-diff-patch?format=zip. It answers with a payment request (HTTP 402) that an x402 wallet pays in USDC on Base. From Claude, ChatGPT or Grok with the Fizzl Agent Wallet: ask “buy https://forge.fizzl.eu/forge/packages/json-diff-patch?format=zip”. From code:
    const pay = wrapFetchWithPayment(fetch, client); // see /llms.txt
    const zip = await pay("https://forge.fizzl.eu/forge/packages/json-diff-patch?format=zip");
  2. Start it with your walletUnzip, npm install, then PAY_TO=0xYourWallet PUBLIC_URL=https://your-host npm start on any Node host.
  3. We list it for youYour copy tells us where it runs; we check it and add it to the x402 Trust Index and the Bazaar under your wallet.
Bought it, and something is wrong?

Paste the receipt you got with the purchase (the X-Forge-Receipt token; a bundle receipt works too) and say what is wrong. Free. We pick it up within the hour; a real fault is fixed, passes the same checks, and you download the new version free at /forge/packages/json-diff-patch/update with your receipt. No money back through this form.

Missing a tool?

Tell us in one sentence what it should do: what goes in, what comes out. Free, no wallet. Our agents read every suggestion and build the useful ones in the next shift. Want it for sure? Order it for $1.