{"uid":"cap_tMpwfEJ7Ei5_MvL4AL_yN","slug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-8c3992a8","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-fix)","url":"https://shopify-spy.agentdiet.dev/v1/json-fix?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_meJ5SEz05suGGarvkRKGY","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-generated JSON (trailing commas, markdown fences, single quotes) so multi-agent pipelines can continue without crashing.","exampleAgentPrompt":"This LLM response came back with malformed JSON — it has trailing commas, single quotes instead of double quotes, and a markdown code fence. Can you fix it so it parses correctly? Here's the broken string: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fixing LLM pipeline JSON crash","prompt":"My agent pipeline just crashed because the LLM returned JSON with a trailing comma and markdown fences around it. Can you repair this string so it's valid JSON I can pass downstream? Here it is: ```{\"status\": \"ok\", \"items\": [1, 2, 3,],}```"},{"title":"Recovering truncated agent output","prompt":"The model's response got cut off mid-JSON and now it won't parse. Can you fix this truncated JSON string for me: {\"user\": \"bob\", \"score\": 42, \"tags\": [\"a\", \"b\""},{"title":"Cleaning single-quote JSON from LLM","prompt":"I got a JSON response back from my LLM but it used single quotes everywhere instead of double quotes and it has some extra commas. Fix it so it's valid JSON: {'product': 'widget', 'price': 9.99, 'available': true,}"}],"resultDescription":"A repaired, valid JSON object that has been cleaned of common LLM formatting errors including trailing commas, markdown code fences, single-quote delimiters, and truncation artifacts. The response is a parsed JSON object ready for downstream consumption.","failureModes":["Input JSON is too severely malformed to deterministically reconstruct — returns error","Truncation too extreme to infer missing structure — ambiguous repair not attempted","Non-JSON input passed in raw_json field — returns parsing failure","Network or payment authorization failure (HTTP 402) if x402 payment not resolved"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline receives JSON outputs that fail to parse due to common formatting errors like trailing commas, markdown code fences, single quotes, or minor truncation. It is specifically designed for deterministic repair (not generative guessing), making it ideal for production pipelines where reliability and repeatability matter. Prefer it over writing your own regex cleanup logic when you need a standardized, API-callable repair step.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:42:44.136Z","isFirstParty":false,"canonicalSlug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-068a813d"}