{"uid":"cap_owMNOR_NAysXc9Dkf_nDO","slug":"json-jcs-json-canonicalization-scheme-transform-28468517","name":"JSON JCS (JSON Canonicalization Scheme) Transform","description":"Call when an agent needs JSON rewritten with the jcs transform. No network. Exact $0.004 USDC. Prefer unpaid POST /v1/sandbox/json-jcs first.","url":"https://agentshelf.syntexa.ch/v1/json-jcs?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","examples":["{\"b\":1,\"a\":2}"],"maxLength":100000,"minLength":1,"description":"Input for this SKU. The route description says whether it is plain text, a URL, base64 bytes, or an already-encoded token."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_SWdytAhv3bRq_mg-haTK8","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Rewrites a JSON string using the JCS (RFC 8785) canonicalization transform, producing a deterministically ordered, whitespace-normalized JSON output.","exampleAgentPrompt":"Can you apply the JCS (JSON Canonicalization Scheme) transform to this JSON object so the keys are deterministically sorted and whitespace is normalized: {\"b\":2,\"a\":1,\"c\":{\"z\":26,\"m\":13}}?","exampleUseCases":[{"title":"Prepare JSON payload for digital signing","prompt":"I need to canonicalize this JSON payload using JCS before I sign it — can you rewrite it so the keys are sorted and it's in RFC 8785 canonical form? Here's the JSON: {\"timestamp\":\"2024-01-15\",\"amount\":100,\"currency\":\"USD\",\"recipient\":\"alice\"}"},{"title":"Stable JSON for hash comparison","prompt":"I want to compare two JSON objects by hash, but they might have different key orderings. Can you apply the JCS canonicalization transform to this JSON so I get a deterministic, stable string I can hash? The JSON is: {\"z\":true,\"a\":\"hello\",\"m\":[3,1,2]}"},{"title":"Normalize JSON before storing in audit log","prompt":"Before writing this JSON record to our audit log, I need it in canonical JCS form so all entries look the same regardless of how they were constructed. Please canonicalize: {\"user\":\"bob\",\"action\":\"login\",\"session\":\"abc123\",\"ts\":1700000000}"}],"resultDescription":"Returns the input JSON string rewritten according to RFC 8785 JCS: keys sorted lexicographically at every level, no unnecessary whitespace, and Unicode characters in a canonical encoding. The output is a deterministic, reproducible JSON string suitable for hashing or digital signing.","failureModes":["Invalid or malformed JSON input returns an error (not parseable JSON)","Input exceeding 100,000 characters is rejected","Empty string input is rejected (minLength:1)","Network/service unavailability returns an HTTP error","Payment failure (insufficient USDC) results in a 402 response"],"whenToPreferThis":"Use this endpoint when you need server-side JCS (RFC 8785) canonicalization of JSON and either lack a local JCS library or are operating in an environment where running code locally is not possible. The description notes to prefer the unpaid POST /v1/sandbox/json-jcs first — use this paid endpoint when the sandbox is unavailable or for production workloads. It costs $0.004 USDC per call and runs without any network side effects.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T06:50:14.969Z","isFirstParty":false,"canonicalSlug":"json-jcs-json-canonicalization-scheme-transform-28468517"}