# Stop losing code blocks in structured outputs during JSON parsing

> We fixed an issue where JSON cleaning was stripping or corrupting code blocks embedded in string values before the parse was even attempted.

- Published: 2026-04-14
- Author: Agno Team
- Category: Changelog
- Canonical: https://agno-com-nine.vercel.app/articles/stop-losing-code-blocks-in-structured-outputs-during-json-parsing
- Markdown: https://agno-com-nine.vercel.app/articles/stop-losing-code-blocks-in-structured-outputs-during-json-parsing.md

We fixed an issue where JSON cleaning was stripping or corrupting code blocks embedded in string values before the parse was even attempted. The parser now tries a raw JSON parse first and only falls back to cleaning if that fails, preserving code blocks and other structured content in the output as intended.
