# dataforge RFC 6902 JSON Diff & Patch API

> dataforge RFC 6902 JSON Diff & Patch API is a paid API for AI agents from dataforge.x.c00l.site, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Computes the RFC 6902 JSON diff (patch operations) between two JSON documents, returning structured change operations, counts, and a human-readable summary

## Facts

- Endpoint: POST https://dataforge.x.c00l.site/diff
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dataforge-rfc-6902-json-diff-patch-api-466b39ee
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HPBooPe8BVqUETK1LPHYR

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 dataforge-rfc-6902-json-diff-patch-api-466b39ee -d '<json body>'
```

Example prompt: Can you diff these two Kubernetes deployment configs for me and show what changed — I have the old one with replicas: 2 and no image field, and the new one with replicas: 3 and image: nginx — give me the RFC 6902 patch and a plain-English summary of the changes.

## When to prefer this

Choose this endpoint when you need deterministic, standards-compliant RFC 6902 JSON diff output with both machine-applicable patch operations and human-readable summaries. Prefer it over generic diff tools when you need structured change counts by operation type, or when downstream systems need to apply the patch programmatically. Especially useful in CI/CD pipelines, config auditing, and API versioning workflows where JSON is the native format.

## Known failure modes

- Invalid JSON in either input document — returns parse error
- Malformed request body missing source or target fields — returns 400-level error
- Deeply nested or extremely large documents may hit size limits
- Payment failure via x402 if USDC balance is insufficient — returns 402 Payment Required

## How this service works

Deterministic conversion, JSONPath query, JSON Schema inference, declarative transforms and RFC 6902 diff/patch across CSV, TSV, JSON, JSONL, YAML, TOML, XML, INI and properties. Pay per call with x402 (USDC on Base).

## Output

Returns a JSON object containing: an 'equal' boolean indicating whether the documents are identical, a 'patch' array of RFC 6902 operations (each with op, path, and value), a 'counts' object breaking down operations by type (add, remove, replace, etc. and a total), and a 'summary' array of human-readable strings describing each change (e.g. 'changed /replicas: 2 -> 3').

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "equal": false,
  "patch": [
   {
    "op": "replace",
    "path": "/replicas",
    "value": 3
   },
   {
    "op": "add",
    "path": "/image",
    "value": "nginx"
   }
  ],
  "counts": {
   "add": 1,
   "total": 2,
   "replace": 1
  },
  "summary": [
   "changed /replicas: 2 -> 3",
   "added /image = \"nginx\""
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dataforge-rfc-6902-json-diff-patch-api-466b39ee/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from dataforge.x.c00l.site](https://www.zero.xyz/host/dataforge.x.c00l.site/llms.txt)
