repair_json
Fixes malformed, truncated, or unclosed JSON strings from LLMs by deterministically parsing and repairing syntax errors, then returns valid JSON.
Instructions
Deterministically parses and repairs malformed, truncated, or unclosed JSON strings produced by LLMs (e.g. missing closing brackets, unescaped quotes, trailing commas). Returns parsed valid JSON object. Use when an LLM produces syntax-broken JSON. Do not use on valid non-JSON prose or for modifying data values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw_json | Yes | The unparsed, malformed, or incomplete JSON text string requiring syntax repair into standard RFC 8259 format. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| repaired_json | Yes |