{"uid":"cap_u6rligAzhZd7W4rHY_xKq","slug":"json-repair-api-30204d24","name":"JSON Repair API","description":"Repair common malformed JSON patterns and return strict parseable JSON.","url":"https://x402-zoo.lolagent.workers.dev/api/json-repair","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Ga7R6y0tBT29zxvApIdCY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs common malformed JSON patterns and returns strict, parseable JSON","exampleAgentPrompt":"This JSON string is invalid and won't parse — can you repair it and give me back strict, valid JSON? Here it is: {name: 'Alice', age: 30, hobbies: ['reading', 'coding',]}","exampleUseCases":[{"title":"Fix LLM-generated malformed JSON","prompt":"The AI returned some JSON but it has trailing commas and unquoted keys — can you repair it so I can actually parse it? Here's the broken output: {name: John, scores: [95, 87, 92,], active: true}"},{"title":"Sanitize API response before ingestion","prompt":"I'm getting JSON back from a third-party API that sometimes has syntax errors like missing closing brackets or single quotes instead of double quotes. Can you fix this so my pipeline doesn't crash? Input: {'user': 'bob', 'email': 'bob@example.com'"},{"title":"Recover corrupted config file JSON","prompt":"My config file JSON got corrupted somehow — it has some extra commas and a few unescaped characters. Can you repair it and return clean, valid JSON I can load back in? Here it is: {\"host\": \"localhost\", \"port\": 8080, \"tags\": [\"web\", \"api\",],}"}],"resultDescription":"Returns a strict, fully parseable JSON value with common malformation patterns corrected — such as unquoted keys, trailing commas, single quotes, missing brackets, and unescaped characters — ready for direct use in downstream JSON parsers.","failureModes":["Input JSON is so severely corrupted that structure cannot be inferred — returns error or best-effort partial repair","Input text is not JSON at all (e.g. plain prose) — may fail or return unexpected output","Ambiguous structural errors where multiple valid repairs are possible — result may not match original intent","Empty or null input text — returns error response"],"whenToPreferThis":"Choose this endpoint when you have a JSON string that fails strict parsing due to common syntactic issues like trailing commas, unquoted keys, or mismatched brackets, and you need a quick automated fix without writing custom repair logic. Ideal for sanitizing LLM outputs, fixing third-party API responses, or recovering corrupted JSON configs. Prefer this over manual regex fixes or custom parsers when the malformations are common patterns.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T13:04:05.245Z","isFirstParty":false}