{"uid":"cap_oRhpUBRntiALB0-YdTsvI","slug":"shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-2c502704","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-intel.agentdiet.dev/v1/malformed-json-healer)","url":"https://shopify-intel.agentdiet.dev/v1/malformed-json-healer?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_TPQnV8AZAei_ZdEcHAgRV","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-intel.agentdiet.dev","brandSlug":"shopify-intel-agentdiet-dev-mpp","brandBaseUrl":"https://shopify-intel.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs malformed, truncated, or markdown-wrapped JSON strings (trailing commas, single quotes, code fences) into valid, parseable JSON for use in multi-agent pipelines.","exampleAgentPrompt":"This LLM response came back with broken JSON — trailing commas, single quotes, and markdown fences — can you run it through the JSON healer and give me back a clean, parseable object? Here's the raw string: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"LLM output JSON cleanup in pipeline","prompt":"My agent just got back this malformed JSON from a language model and it's crashing the next step in my workflow — can you repair it into valid JSON? Here's the raw output: {\"items\": [\"apple\", \"banana\",], 'count': 2}"},{"title":"Stripping markdown fences from AI response","prompt":"The model wrapped its JSON in triple backtick code fences and now my parser is failing — can you strip those out and give me back the clean JSON object?"},{"title":"Fixing truncated JSON from a streaming LLM","prompt":"My streaming LLM cut off mid-response and I ended up with this truncated JSON that won't parse: {\"user\": \"bob\", \"score\": 95, \"tags\": [\"vip\" — can you try to repair it into something valid?"}],"resultDescription":"A repaired, valid JSON object or string with all syntax errors resolved — trailing commas removed, single quotes replaced with double quotes, markdown fences stripped, and truncations recovered where possible — ready to be parsed and used downstream in an agent pipeline.","failureModes":["Input JSON is so severely truncated or corrupted that deterministic repair is impossible — may return an error or best-effort partial result","Input string is not JSON at all (e.g. plain text or binary) — returns a validation error","Ambiguous structure where multiple valid repairs exist — endpoint picks one deterministically, which may not match original intent","Empty or whitespace-only input — returns a validation error for missing required field"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair (not AI guessing) in a multi-agent or LLM pipeline where broken JSON from model outputs — trailing commas, single quotes, markdown fences, or truncations — is causing downstream parse failures. Prefer this over writing custom regex sanitization or calling a general-purpose LLM to fix JSON, as it is fast, low-cost ($0.002/call), and guaranteed to apply consistent repair rules without hallucinating new content.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:44.743Z","isFirstParty":false,"canonicalSlug":"shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-991f500e"}