{"uid":"cap_tuUlOdrrv-1dnv5DFUR5C","slug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-46aaeda6","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://shopify-spy.agentdiet.dev/v1/json-normalizer)","url":"https://shopify-spy.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_AuZoNiuTYfh9rAUG7vyRy","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"shopify-spy.agentdiet.dev","brandSlug":"shopify-spy-agentdiet-dev-mpp","brandBaseUrl":"https://shopify-spy.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":"The LLM returned this broken JSON with trailing commas and markdown fences — can you repair it so it's valid and parseable: ```{\"name\": \"Alice\", \"age\": 30,}```?","exampleUseCases":[{"title":"Fix LLM output in agentic pipeline","prompt":"My agent just got this malformed JSON back from the model — it has single quotes and a trailing comma. Clean it up so the next step in the pipeline doesn't crash: {'name': 'Bob', 'score': 95,}"},{"title":"Strip markdown fences from JSON response","prompt":"The LLM wrapped its JSON output in markdown code fences and now my parser is failing. Can you strip the fences and fix any other issues in this string: ```json\n{\"status\": \"ok\", \"items\": [1, 2, 3,]}\n```?"},{"title":"Repair truncated JSON from streaming model","prompt":"The streaming response got cut off mid-JSON and now I have an incomplete object. Try to repair this truncated JSON so I can extract the data: {\"user\": \"carol\", \"results\": [\"a\", \"b\""}],"resultDescription":"Returns a repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncations resolved where possible.","failureModes":["Input JSON is so severely malformed it cannot be deterministically reconstructed","Empty or missing raw_json parameter returns an error","Ambiguous truncation points where repair is non-deterministic may produce unexpected structure","Very large JSON strings may hit size limits"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives JSON from an LLM that fails to parse due to common LLM formatting errors such as trailing commas, markdown code fences, single-quoted keys/values, or truncated output. Ideal for A2A workflows where downstream agents require valid JSON and you need a deterministic, cheap repair step rather than re-invoking the expensive LLM.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:18.216Z","isFirstParty":false,"canonicalSlug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-068a813d"}