{"uid":"cap_lOphKkkFrmPogYJ4COchH","slug":"workflows-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-f8ce5052","name":"Deterministic A2A Broken-JSON Repair & Schema Validator","description":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash. (Live x402 v2, IETF MPP & MCP endpoint at https://workflows.agentdiet.dev/v1/json-normalizer)","url":"https://workflows.agentdiet.dev/v1/json-normalizer?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["raw_json"],"properties":{"raw_json":{"type":"string","minLength":1,"description":"Malformed, truncated, or markdown-wrapped JSON string to deterministically repair"}}},"responseSchema":{"type":"object"},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0.002","displayCostAsset":"USD","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.002/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nDcCVR2NIsSoiBqh37LUn","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"workflows.agentdiet.dev","brandSlug":"workflows-agentdiet-dev-mpp","brandBaseUrl":"https://workflows.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash","exampleAgentPrompt":"This JSON came back from the LLM with trailing commas and markdown code fences wrapped around it — can you run it through the JSON normalizer to get a clean, parseable object? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"The language model just returned this JSON with a trailing comma and it's breaking my pipeline — clean it up so it parses correctly: {\"items\": [\"apple\", \"banana\",], \"count\": 2}"},{"title":"Strip markdown fences from JSON","prompt":"My agent got back a response wrapped in triple backticks with 'json' as the language tag — can you strip the markdown fencing and give me just the valid JSON object inside?"},{"title":"Repair single-quoted JSON from scraper","prompt":"I scraped some data and the JSON is using single quotes instead of double quotes, which makes it invalid — can you convert it to proper JSON so I can process it? Here's the string: {'user': 'bob', 'score': 42}"}],"resultDescription":"A parsed, valid JSON object reconstructed from the malformed input — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream consumption in agent pipelines.","failureModes":["Input is so severely corrupted that deterministic repair is impossible, returning an error","Input string is empty or missing the raw_json parameter","JSON structure is ambiguous beyond repair (e.g. completely unparseable non-JSON text)","Extremely large or deeply nested JSON may time out"],"whenToPreferThis":"Choose this endpoint when your agent pipeline receives LLM-generated or scraped JSON that fails standard JSON.parse() due to common formatting issues like trailing commas, markdown code fences, single quotes, or truncation. It is purpose-built for multi-agent and A2A workflows where deterministic, reliable JSON normalization is critical and crashing is not acceptable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:11.146Z","isFirstParty":false,"canonicalSlug":"workflows-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ded1fe6a"}