# x402.shizu.me JSON Diff

> x402.shizu.me JSON Diff is a paid API for AI agents from x402.shizu.me, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-02).

Structurally diffs two JSON documents, returning all added, removed, and changed paths with old/new values and an equality flag.

## Facts

- Endpoint: POST https://x402.shizu.me/jsondiff?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-shizu-me-json-diff-b5a80751
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6uZLIjAFiRQxwfO3L1z8Q

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-shizu-me-json-diff-b5a80751 -d '<json body>'
```

Example prompt: Compare these two JSON objects and tell me everything that was added, removed, or changed — here's the before: {"version":"1.0","timeout":30,"features":{"darkMode":false}} and the after: {"version":"1.1","timeout":60,"features":{"darkMode":true,"betaUI":true}}.

## When to prefer this

Choose this endpoint when you need a quick, structured JSON diff without writing custom traversal logic — especially useful for agents comparing API snapshots, config versions, or before/after state changes in a pipeline. Prefer it over text-based diff tools when you need machine-readable path-level changes with typed old/new values rather than line-by-line text output.

## Known failure modes

- Malformed or non-JSON input for a or b returns an error
- Missing required fields a or b in request body
- Payment failure or insufficient USDC balance returns 402
- Very deeply nested or extremely large JSON documents may time out
- Arrays with reordered elements may produce verbose path-level diffs rather than semantic move detection

## How this service works

Diff two JSON documents structurally. POST {a, b} returns every added, removed, and changed path with old/new values, plus an equal flag. Handles nested objects and arrays. For agents comparing API snapshots, config versions, or before/after state without writing traversal code.

## Output

A structured diff object listing every path in the two JSON documents that was added, removed, or changed, with the old value and new value at each changed path, plus a top-level boolean equal flag indicating whether the documents are identical.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {},
  "b": {}
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 2,
  "equal": false,
  "changes": [
   {
    "op": "changed",
    "new": 2,
    "old": 1,
    "path": "$.x"
   },
   {
    "op": "added",
    "new": 3,
    "path": "$.y"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-shizu-me-json-diff-b5a80751/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.shizu.me](https://www.zero.xyz/host/x402.shizu.me/llms.txt)
