# JSON Structural Diff

> JSON Structural Diff is a paid API for AI agents from toolbelt402.tpoborne.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Computes a structural diff between two JSON documents, returning add/remove/change operations with JSON-Pointer paths, before/after values, and an identical flag.

## Facts

- Endpoint: POST https://toolbelt402.tpoborne.workers.dev/json/diff
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-structural-diff-2462892b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_86Q2PV-qERXdeLqAVtnRv

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 json-structural-diff-2462892b -d '<json body>'
```

Example prompt: Compare these two JSON objects and show me exactly what changed — list every add, remove, and modify with the JSON-Pointer path and the before/after values: first is {"name":"Alice","role":"admin","score":10} and second is {"name":"Alice","role":"user","score":10,"active":true}.

## When to prefer this

Choose this endpoint when you need a precise, structured diff of two JSON documents with JSON-Pointer paths and before/after values — ideal for comparing API responses, detecting configuration drift, verifying patches, or auditing changes between two JSON versions. Prefer this over text-based diff tools when you need machine-readable operations (add/remove/change) rather than line-by-line textual output.

## Known failure modes

- Invalid JSON in either input document — returns a parse error
- Missing one or both input documents — returns a validation error
- Extremely large or deeply nested JSON may time out or exceed payload limits

## How this service works

Structural diff of two JSON documents — add/remove/change operations with JSON-Pointer paths, before/after values, and an identical flag. Compare API responses and configs.

## Output

Returns a list of diff operations (add, remove, change), each with a JSON-Pointer path indicating the location in the document, the before value, the after value where applicable, and a top-level identical boolean flag indicating whether the two documents are structurally equivalent.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "description": "Original JSON document"
  },
  "b": {
   "description": "Changed JSON document"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-structural-diff-2462892b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toolbelt402.tpoborne.workers.dev](https://www.zero.xyz/host/toolbelt402.tpoborne.workers.dev/llms.txt)
