{"uid":"cap_11YP6Ptgh89qXXXUJYyLG","slug":"uos-genesis-machine-canonicalize-json-f109ecff","name":"UOS Genesis Machine – Canonicalize JSON","description":"Autonomous paid machine utilities using x402 and Base USDC.","url":"https://genesis.palsus2023.workers.dev/v1/canonicalize_json?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","properties":{"input":{"type":"string","description":"Canonicalize JSON into deterministic machine-readable output with recursively sorted object keys. Useful for canonical JSON, stable hashes, signing, cache keys, deduplication, API normalization, deterministic serialization, and machine-to-machine workflows."}},"additionalProperties":true},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json"],"type":"string"}},"additionalProperties":false},"output":{"type":"object"}},"additionalProperties":true},"responseSchema":{"type":"json","example":{"result":"GENESIS* machine-readable service result","service":"canonicalize_json","success":true}},"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_x5cTdIsRL4zB3v4T2FDrA","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":"Transforms a JSON object into a deterministically ordered, canonicalized string with recursively sorted keys, suitable for hashing, signing, and deduplication.","exampleAgentPrompt":"Canonicalize this JSON object for me so all keys are recursively sorted and it produces a stable, deterministic output I can use for hashing: {\"z\": 1, \"a\": {\"m\": 2, \"b\": 3}}.","exampleUseCases":[{"title":"Stable hash key for caching","prompt":"I need to generate a stable cache key from this JSON config object — can you canonicalize it so the key order doesn't affect the hash? Here's the object: {\"region\": \"us-east\", \"tier\": \"pro\", \"flags\": {\"verbose\": true, \"retry\": 3}}."},{"title":"Pre-signing JSON normalization","prompt":"Before I sign this API payload with my private key, I need it in a canonical form with all nested keys sorted alphabetically so the signature is reproducible — please canonicalize: {\"user\": \"alice\", \"action\": \"transfer\", \"meta\": {\"timestamp\": 1700000000, \"nonce\": \"abc\"}}."},{"title":"Deduplication of JSON records","prompt":"I'm getting duplicate JSON records that are identical in content but have keys in different orders — can you canonicalize this one so I can compare it against a normalized dataset? Object: {\"score\": 99, \"id\": \"x7\", \"tags\": {\"env\": \"prod\", \"app\": \"billing\"}}."}],"resultDescription":"Returns a JSON response containing a 'result' field with the canonicalized, recursively key-sorted JSON string, a 'service' field confirming 'canonicalize_json', and a 'success' boolean indicating whether the operation succeeded.","failureModes":["Malformed or non-parseable JSON input returns an error with success: false","Missing required 'input' string field causes a validation error","Payment not provided or insufficient USDC triggers an x402 payment-required response","Network timeout on the Cloudflare Worker edge node"],"whenToPreferThis":"Choose this endpoint when you need a guaranteed deterministic, recursively sorted JSON serialization — especially for cryptographic signing, stable hashing, cache key generation, or deduplication workflows where key ordering must be consistent across different producers. It is purpose-built for machine-to-machine canonical JSON scenarios at very low cost ($0.001 USDC) and operates on the x402 micropayment protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T06:49:37.567Z","isFirstParty":false,"canonicalSlug":"uos-genesis-machine-canonicalize-json-f109ecff"}