extract_json
Extract valid JSON from messy LLM output by trying the full text, then a fenced json block, then the largest balanced braces.
Instructions
Pull a JSON value out of messy LLM output. Tries the whole text, then a fenced json block, then the largest balanced {...}/[...] substring. Returns the parsed value plus which strategy succeeded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Free-form text from an LLM that may contain JSON anywhere inside. |