{"uid":"cap_1UZcByYtHOG6WYF9Gls6i","slug":"coco-json-fix-json-validation-and-repair-tool-47a5132f","name":"CoCo JSON Fix — JSON Validation and Repair Tool","description":"Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.","url":"https://cocoeatsai.com/area4/agent/tools/json-fix?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input","output"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"enum":["GET"]},"queryParams":{"type":"object","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type","example"],"properties":{"type":{"const":"json"},"example":{"type":"object","required":["was_valid_json"],"properties":{"was_valid_json":{"type":"boolean"}}}}}}},"responseSchema":{"type":"json","example":{"repaired":{"example":1},"repaired_text":"{\"example\": 1}","was_valid_json":true},"exampleNote":"Computed offline with demonstration inputs; time/random values are illustrative."},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_AnmbfuTo1jEX8VOl8v7Vt","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates and repairs malformed JSON strings, returning the corrected JSON object and text along with a validity flag","exampleAgentPrompt":"I have a broken JSON string that won't parse — can you run it through the json-fix tool on CoCo to repair it and give me back valid, corrected JSON?","exampleUseCases":[{"title":"Fixing LLM-generated malformed JSON","prompt":"The AI just returned some JSON with missing quotes and a trailing comma and it's breaking my parser — can you fix and repair it so I get valid JSON back?"},{"title":"Validating API response JSON","prompt":"I got this JSON response from a third-party API and I'm not sure if it's actually valid — can you check it and repair any issues so I can safely use it?"},{"title":"Recovering data from corrupted JSON file","prompt":"My JSON config file got corrupted and now it won't parse — can you run it through a JSON repair tool and give me back the corrected version?"}],"resultDescription":"Returns a JSON object containing three fields: 'repaired' (the corrected JSON as a parsed object), 'repaired_text' (the corrected JSON as a formatted string), and 'was_valid_json' (a boolean indicating whether the original input was already valid JSON).","failureModes":["Input JSON is so severely malformed that repair is impossible","Non-JSON input provided (e.g. plain text, XML) that cannot be interpreted as JSON","Empty input returns ambiguous or error response","Network timeout for large JSON payloads"],"whenToPreferThis":"Choose this endpoint when you have a JSON string that fails to parse due to syntax errors (missing quotes, trailing commas, unescaped characters, etc.) and need it automatically repaired. Useful when working with LLM-generated JSON, user-provided JSON, or third-party API responses that are nearly-valid but syntactically broken. Prefer this over manual parsing logic when you need a quick, cheap automated repair step in a pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T12:40:09.705Z","isFirstParty":false,"canonicalSlug":"coco-json-fix-json-validation-and-repair-tool-47a5132f"}