{"uid":"cap_UP0XJPPrMHkisZCDGlImc","slug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-3c892560","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://defi-yield.agentdiet.dev/v1/json-normalizer)","url":"https://defi-yield.agentdiet.dev/v1/json-normalizer?utm_source=zero.xyz","method":"POST","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_TcruFYdJuN736Ll0NJIr6","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"defi-yield.agentdiet.dev","brandSlug":"defi-yield-agentdiet-dev-mpp","brandBaseUrl":"https://defi-yield.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM-generated JSON (trailing commas, markdown fences, single quotes, truncation) so multi-agent pipelines can proceed without crashing.","exampleAgentPrompt":"This LLM response came back as broken JSON with trailing commas, markdown code fences, and single quotes — can you repair it into valid JSON so I can pass it to the next step in my pipeline? Here's the raw string: ```json {name: 'Alice', scores: [1, 2, 3,], active: true,} ```","exampleUseCases":[{"title":"LLM output sanitization in agent pipeline","prompt":"My AI just returned a JSON blob that has trailing commas and is wrapped in markdown backticks — it's breaking my downstream parser. Can you fix it into clean, valid JSON? Here's the raw output: ```json {user: 'Bob', tags: ['admin', 'editor',], active: true,} ```"},{"title":"Recovering truncated JSON from a long generation","prompt":"The model cut off mid-generation and now I have an incomplete JSON object that's missing closing brackets. Can you repair and complete it into valid JSON? The raw string is: {\"items\": [{\"id\": 1, \"name\": \"Widget\"}, {\"id\": 2, \"name\": \"Gadget\""},{"title":"Pipeline resilience for multi-agent swarm","prompt":"In my multi-agent workflow, one of the sub-agents occasionally returns JSON with single quotes and unquoted keys. Can you normalize this so it always passes JSON.parse? The raw payload is: {status: 'ok', result: {count: 42, tags: ['a', 'b']}}"}],"resultDescription":"A JSON object containing the repaired, normalized, and schema-valid version of the input string — ready to be parsed or forwarded to the next pipeline stage. Typical fields include the corrected JSON value and potentially a status or repair summary.","failureModes":["Input string is so severely malformed it cannot be deterministically recovered — returns an error indicating irrecoverable structure","Input is not JSON-like at all (e.g. plain prose) — may return a parsing failure or empty result","Payment not provided or invalid — HTTP 402 response blocking execution","Missing required raw_json field — HTTP 400 validation error"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline regularly produces malformed JSON that causes downstream crashes — especially when you need deterministic, rule-based repair rather than a secondary LLM call to reformat the output. It is particularly valuable when outputs contain predictable LLM artifacts like markdown fences, trailing commas, or single-quoted keys, and you need a cheap, fast, idempotent fix per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:37:45.060Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ff23e186"}