{"uid":"cap_9Q7QC26Kktom-HEZvW4_-","slug":"atinamos-json-validate-repair-7676dd85","name":"Atinamos JSON Validate / Repair","description":"Deterministic JSON validation and conservative repair for AI-agent payloads. Repairs unquoted object keys, single-quoted strings, trailing commas, Markdown code fences, UTF-8 BOMs and JSON-compatible Python literals, including nested or repeated defects. No LLM or invented data; every applied transformation is reported.","url":"https://agent.atinamos.co.uk/agent/json-repair","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"json":{"type":"string","maxLength":262144,"description":"JSON or JSON-like text to validate or conservatively repair. Supported repairs include unquoted object keys, single-quoted strings, trailing commas, Markdown fences, UTF-8 BOMs and JSON-compatible Python literals."},"mode":{"enum":["validate","repair"],"type":"string","default":"repair"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YVhXaDROoT4wKRDsF4kwg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Deterministically validates and conservatively repairs malformed JSON strings, reporting every transformation applied without inventing or hallucinating data.","exampleAgentPrompt":"Can you validate and repair this JSON string from our AI pipeline — it has some trailing commas and single-quoted strings — and tell me exactly what was fixed: {name: 'Alice', scores: [1, 2, 3,]}","exampleUseCases":[{"title":"Fixing LLM-generated JSON payloads","prompt":"The JSON our AI model returned has unquoted keys and trailing commas and keeps breaking our parser — can you repair it and tell me what was changed so I can log the issues?"},{"title":"Pre-parse validation without modification","prompt":"Before I try to parse this JSON string, can you just validate it and tell me whether it's clean, without making any changes to it? I want to know if it's strictly valid."},{"title":"Stripping Markdown fences from agent output","prompt":"Our agent keeps wrapping its JSON responses in triple-backtick Markdown code fences — can you strip those out and return clean, parseable JSON, listing what you removed?"}],"resultDescription":"Returns the validated or repaired JSON string along with a structured list of every transformation that was applied (e.g. 'removed trailing comma at line 4', 'converted single-quoted strings to double-quoted'). In validate mode, returns a pass/fail result with any detected defects. No data is invented or hallucinated; only reversible, conservative fixes are applied.","failureModes":["Input exceeds 262144 character limit — request rejected","JSON is so malformed it cannot be conservatively repaired without inventing data — returns error rather than guessing","Invalid mode value (not 'validate' or 'repair') — validation error","Non-JSON-like content (e.g. binary data, HTML) that cannot be interpreted as JSON — returns failure with reason","Network timeout or service unavailability — HTTP 5xx error","Payment not received or insufficient — HTTP 402 error"],"whenToPreferThis":"Prefer this endpoint when you need deterministic, auditable JSON repair with a full transformation log and zero risk of hallucinated or invented data. It is ideal for AI agent pipelines where LLM outputs are often nearly-valid JSON with common defects like trailing commas, single quotes, or Markdown wrappers. Choose this over an LLM-based repair approach when you need reproducibility, auditability, and guaranteed no data invention. Best for payloads up to 256KB.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:39:03.246Z","isFirstParty":false}