{"uid":"cap_9oYqx0w7zJR99dzouKXiG","slug":"preflight-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6630403c","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://preflight.agentdiet.dev/v1/json-normalizer)","url":"https://preflight.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_ppgtJumGtJTidSyVnfkDq","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"preflight.agentdiet.dev","brandSlug":"preflight-agentdiet-dev-mpp","brandBaseUrl":"https://preflight.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 LLM just returned some broken JSON with trailing commas and markdown code fences — can you clean it up and give me a valid, parseable JSON object? Here's the raw output: ```json {name: 'Alice', age: 30,}```","exampleUseCases":[{"title":"Fix LLM output before downstream agent","prompt":"My agent just got this JSON back from GPT-4 and it's broken — there are single quotes, a trailing comma, and it's wrapped in a markdown code block. Can you repair it so I can pass it to the next step? Here it is: ```json {'user': 'Bob', 'score': 42,}```"},{"title":"Validate JSON in agentic workflow pipeline","prompt":"I'm running a multi-step agent pipeline and the JSON produced in step 2 looks truncated — it ends mid-object. Can you repair and normalize it so the pipeline doesn't crash? The raw string is: {\"name\": \"Acme Corp\", \"revenue\": 5000000, \"tags\": [\"B2B\","},{"title":"Sanitize markdown-wrapped JSON from chatbot response","prompt":"My chatbot returned JSON wrapped in triple backticks with some trailing commas and inconsistent quoting — can you strip the markdown and give me clean, parseable JSON? Raw output: ```{product: \"Widget\", price: 9.99,}```"}],"resultDescription":"Returns a repaired, valid JSON object with all syntax errors fixed — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for immediate use in downstream agent steps.","failureModes":["Input is so severely malformed it cannot be deterministically repaired — returns error indicating unrecoverable JSON","Input is not JSON at all (e.g. plain text or binary) — returns validation error","raw_json parameter is empty or missing — returns 400 bad request","Extremely large or deeply nested JSON may timeout or exceed processing limits"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives JSON from an LLM or external tool that may be malformed, truncated, or wrapped in markdown, and you need a deterministic (not AI-based) repair that is fast, cheap ($0.002/call), and consistent. Prefer this over attempting to re-prompt the LLM or writing custom parsing logic when reliability and pipeline stability are priorities.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:22.511Z","isFirstParty":false,"canonicalSlug":"preflight-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-1d25665d"}