# JSON Canonicalization (RFC 8785 JCS)

> JSON Canonicalization (RFC 8785 JCS) 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-13).

Canonicalizes a JSON document using RFC 8785 JCS and returns the canonical text, its UTF-8 byte length, and a SHA-256 hash for integrity verification, signature preparation, and deduplication.

## Facts

- Endpoint: POST https://data-tools.use.x402atlas.com/json-canonicalize?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-canonicalization-rfc-8785-jcs-eab52cc0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Omtr94LWatrWI0CBNV14r

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-canonicalization-rfc-8785-jcs-eab52cc0 -d '<json body>'
```

Example prompt: Canonicalize this JSON payload using RFC 8785 JCS and give me the canonical text, its UTF-8 byte length, and the SHA-256 hash so I can use it for a digital signature: {"amount":100,"currency":"USD","recipient":"alice"}

## When to prefer this

Choose this endpoint when you need a standards-compliant RFC 8785 JCS canonical form of a JSON document — especially for cryptographic signing workflows, integrity fingerprinting, or content-addressed deduplication where byte-exact determinism is required. Prefer it over ad-hoc JSON serializers that do not guarantee key ordering or binary64 float rounding compliance.

## Known failure modes

- Input contains negative zero (-0) — rejected per RFC 8785 strict mode
- Input contains a floating-point overflow or nonzero underflow value — rejected
- Input JSON has duplicate keys — rejected with an error
- Malformed or syntactically invalid JSON input — parse error returned
- Input is not a JSON object or array (bare primitives) — may be rejected depending on service constraints

## How this service works

JSON canonicalization — canonicalize structured data with RFC 8785 JCS; return canonical JSON text, UTF-8 byte length and SHA-256 hash for integrity checks, signature preparation and deduplication. Uses binary64 rounding and strict Unicode/duplicate-key checks; rejects negative zero, overflow and nonzero underflow.

## Output

Returns the RFC 8785 JCS canonical JSON text (deterministically ordered, whitespace-stripped), the UTF-8 byte length of that canonical representation, and a SHA-256 hash digest of the canonical bytes. Rejects inputs containing negative zero, numeric overflow, nonzero underflow, or duplicate object keys.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-canonicalization-rfc-8785-jcs-eab52cc0/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)
