{"uid":"cap_VEMP-HKDlKPDzMjaJGzSh","slug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-fe11b7d0","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://serp-extract.agentdiet.dev/v1/json-normalizer)","url":"https://serp-extract.agentdiet.dev/v1/json-normalizer?utm_source=zero.xyz","method":"POST","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_lNMpfWNGy7zv8L9gIeZKg","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"serp-extract.agentdiet.dev","brandSlug":"serp-extract-agentdiet-dev-mpp","brandBaseUrl":"https://serp-extract.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 string came out of my LLM and won't parse — it has trailing commas and markdown code fences. Can you repair it and give me back valid JSON? Here it is: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before downstream processing","prompt":"My language model returned this JSON with a trailing comma and it's breaking my pipeline: {\"status\": \"ok\", \"items\": [1, 2, 3,]} — can you repair it so it parses cleanly?"},{"title":"Strip markdown fences from agent response","prompt":"My AI agent wrapped its JSON in triple backticks and it's crashing my parser. Here's the raw output: ```json\n{\"result\": \"success\"}\n``` — please normalize it into plain valid JSON."},{"title":"Recover truncated JSON from token limit cutoff","prompt":"My LLM hit its token limit mid-response and the JSON got cut off. The string is: {\"user\": \"bob\", \"scores\": [95, 87, — can you repair whatever you can and return valid JSON?"}],"resultDescription":"A repaired, valid JSON object parsed from the input malformed string, with common issues such as trailing commas, markdown code fences, single-quoted keys/values, and truncation corrected deterministically.","failureModes":["Input is so severely truncated or corrupted that no valid repair is possible — returns error or best-effort partial object","Input is not JSON-like at all (e.g. plain prose) — returns validation error","Payment/402 flow fails if x402 credentials are not properly configured","Network timeout if upstream service is unavailable"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives raw LLM output that may contain common JSON formatting errors such as trailing commas, markdown code fences, single-quoted strings, or token-limit truncation. It is preferable to a general-purpose JSON parser when you cannot guarantee clean LLM output, and better than writing custom regex repair logic inline. Use it as a hardening layer between any LLM output stage and a downstream JSON consumer.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T12:37:12.782Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-6e5dc902"}