{"uid":"cap_qz1GTqS0RRyY9gDMx4gGU","slug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-63e94307","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":"GET","headers":{},"bodySchema":{"type":"object","required":["raw_json"],"properties":{"limit":{"type":"integer","default":20,"maximum":100,"minimum":1,"description":"Maximum number of items to return per page (1-100)"},"cursor":{"type":"string","description":"Opaque pagination cursor for fetching the next page"},"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_lGa7KZ7ybbeatK8hrEESW","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) into valid JSON so multi-agent pipelines never crash.","exampleAgentPrompt":"This JSON string came back from the LLM with markdown fences and trailing commas and it's breaking my pipeline — can you repair it and give me back clean, valid JSON? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before pipeline step","prompt":"The language model returned this JSON but it has trailing commas and won't parse: `{\"result\": \"ok\", \"score\": 0.95,}` — clean it up so I can pass it to the next agent step."},{"title":"Strip markdown fences from agent response","prompt":"My agent wrapped its JSON response in triple-backtick markdown fences and now my code is crashing — can you strip the fences and return just the valid JSON object?"},{"title":"Repair truncated JSON from long LLM output","prompt":"The model cut off mid-generation and I got this truncated JSON: `{\"items\": [{\"id\": 1, \"name\": \"foo\"` — can you deterministically repair it so it's parseable?"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed or truncated input. The response corrects common LLM output issues including trailing commas, markdown code fences, single-quoted strings, and truncation, returning a parseable JSON structure.","failureModes":["Input JSON is so severely malformed that deterministic repair is impossible — returns error","raw_json parameter missing or empty — returns 400 validation error","Input is not JSON at all (e.g. plain prose) — repair may fail or return unexpected output","Payment not provided — returns HTTP 402 requiring x402 USDC payment"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs in automated multi-agent pipelines — especially when you cannot afford non-deterministic behavior or hallucinated corrections. Prefer this over manual parsing hacks when handling common LLM artifacts like markdown fences, trailing commas, and single quotes at scale.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:36.736Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-6e5dc902"}