The JSON Medic is the developer who builds and maintains AI JSONMedic. After years of shipping LLM-powered features and losing hours to malformed model output, I wrote the 16-stage repair engine behind this site and now document every failure mode I hit — markdown-wrapped JSON, Python literals, truncated streams, trailing commas and the rest — in these guides.
Why I built AI JSONMedic
I kept shipping features on top of large language models — extraction pipelines, agents, automations in n8n and Make — and kept losing time to the same thing: the model would return almost-valid JSON. A markdown code fence around it. A trailing comma. True instead of true. A response cut off mid-object because it hit the token limit. Every generic JSON validator would just tell me it was broken and stop. None of them would fix it.
So I wrote one that does. The engine behind this site runs a 16-stage pipeline that understands the specific, repeatable ways AI models malform JSON, repairs them, and shows you exactly what it changed and why — never a black box. Everything runs in your browser; your JSON never touches a server.
What I write about here
Every guide on this blog comes from a real failure I reproduced and fixed — not from keyword research. When I document a Pydantic ValidationError, an MCPoutputSchema mismatch, or a Claude tool-call 400, it's because I hit it, traced it, and want the next person to lose ten minutes instead of two hours.
Areas of expertise
- Repairing malformed LLM output (ChatGPT, Claude, Gemini, DeepSeek, local models)
- JSON specification internals — RFC 8259, JSON5, NDJSON, JSON-RPC
- Structured-output tooling — OpenAI JSON mode, Anthropic tool use, MCP schemas
- Streaming & truncation recovery for token-limited responses
- Validation libraries — Zod, Ajv, Pydantic, JSON Schema
- Building fast, privacy-first, client-side developer tools
Credentials
Recent articles
- Invalid escape sequence in JSON: How to Fix It in PythonOct 2026
- Unterminated string in JSON: How to Fix It in PythonOct 2026
- JSONDecodeError: Extra data: How to Fix It in PythonOct 2026
- Expecting property name enclosed in double quotes (Python Fix)Oct 2026
- JSONDecodeError: Expecting ',' delimiter: How to Fix It in PythonOct 2026
- Missing bracket in JSON: How to Fix It in JavaScriptOct 2026
- Single quotes are not valid JSON: Fix JSON.parse() in JavaScriptOct 2026
- Trailing comma in JSON: How to Fix It in JavaScriptOct 2026