# JSON Patch Diff (RFC 6902)

> JSON Patch Diff (RFC 6902) is a paid API for AI agents from data-tools.use.x402atlas.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-14).

Compares two JSON documents and returns a deterministic RFC 6902 patch list with RFC 6901 pointers, replacing changed arrays wholesale and ordering object removals before changes.

## Facts

- Endpoint: POST https://data-tools.use.x402atlas.com/json-diff?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-patch-diff-rfc-6902-0d48316b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Qi4y8547l-hqzji1bIQT6

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-patch-diff-rfc-6902-0d48316b -d '<json body>'
```

Example prompt: Compare these two JSON configs and give me the RFC 6902 patch I need to apply to migrate from the old version to the new one — I need exact pointer paths and the operations in the right order with removals first.

## When to prefer this

Choose this endpoint when you need a standards-compliant, deterministic RFC 6902 patch between two JSON documents, especially for configuration synchronization or record update workflows where predictable patch ordering (removals before changes) and bounded patch size (arrays replaced whole) are required. Prefer over general-purpose diff tools when you specifically need JSON Pointer paths and RFC 6902 operation format for downstream PATCH API calls or audit trails.

## Known failure modes

- Invalid JSON in either input document returns a parse error
- Extremely large JSON documents may hit size or timeout limits
- Non-UTF-8 encoded input may cause parsing failures
- If both documents are identical, returns an empty patch array

## How this service works

JSON Patch diff — compare JSON documents for record updates and configuration synchronization; return a deterministic RFC 6902 patch with RFC 6901 pointers and exact decimal equality. Object removals precede changes; changed arrays are replaced whole, so the patch is bounded rather than guaranteed minimal.

## Output

Returns a deterministic RFC 6902 JSON Patch array containing operations (add, remove, replace) with RFC 6901 JSON Pointer paths. Object removals are ordered before modifications; changed arrays are replaced in full rather than diffed element-by-element, keeping the patch bounded in size. Decimal equality is exact.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-patch-diff-rfc-6902-0d48316b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from data-tools.use.x402atlas.com](https://www.zero.xyz/host/data-tools.use.x402atlas.com/llms.txt)
