{"uid":"cap_LFpyGPIYRS_hzeW9C9sve","slug":"json-canonicalize-f8fa4da6","name":"JSON Canonicalize","description":"Machine-payable x402 utilities for hashing, Base64, UUID generation, unit and timezone conversion, realtime crypto market data, webpage/document extraction, URL-to-Markdown, metadata, RAG ingestion and deterministic website change detection.","url":"https://x402-gateway-production-1f21.up.railway.app/json/canonicalize?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["value"],"properties":{"value":{}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"status":"ready"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wYBoLIY3TEwYypc8weqeX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Canonicalizes a JSON object into a deterministic, normalized form for consistent checksums and encoding.","exampleAgentPrompt":"Take this JSON object and canonicalize it into a deterministic form so I can reliably hash or sign it: {\"z\":1,\"a\":2,\"m\":{\"b\":3,\"a\":1}}.","exampleUseCases":[{"title":"Stable hash for API payload signing","prompt":"I need to sign this JSON payload before sending it: {\"userId\":\"abc123\",\"amount\":500,\"currency\":\"USD\"} — can you canonicalize it first so the hash is always the same regardless of key order?"},{"title":"Deduplication of JSON records","prompt":"I have two JSON objects that might be the same data just in different key orders — canonicalize both of them so I can compare them as strings: {\"b\":2,\"a\":1} and {\"a\":1,\"b\":2}."},{"title":"Reproducible JSON for blockchain logging","prompt":"Before I write this config object to the blockchain, canonicalize it so the serialized form is always identical no matter what library generated it: {\"version\":\"1.0\",\"settings\":{\"retry\":3,\"timeout\":30}}."}],"resultDescription":"A deterministically serialized canonical JSON string where keys are sorted and formatting is normalized, suitable for hashing, signing, or comparison.","failureModes":["Missing required 'input' field returns validation error","Invalid body structure or missing 'value' field causes schema rejection","Malformed JSON in body causes parse error","Payment not included or insufficient USDC causes 402 response"],"whenToPreferThis":"Use this endpoint when you need a deterministic, canonical representation of a JSON object for purposes such as content-addressable hashing, digital signatures, deduplication, or reproducible storage. Prefer this over ad-hoc serialization when key ordering consistency across different systems or libraries is critical.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:40:48.851Z","isFirstParty":false,"canonicalSlug":"json-canonicalize-f8fa4da6"}