Json Repair
json_repairRepair broken or LLM-style JSON into valid JSON: strips markdown fences and surrounding prose, comments, trailing/missing commas, single or smart quotes, unquoted keys and values, Python/JS literals (True/None/undefined), NaN/Infinity, unescaped inner quotes and control characters, truncated output (closes open strings/arrays/objects) and mismatched brackets. Reports every fix applied, the original parse error, type and size stats, and optionally runs a JSONPath query ($.a.b[0], [*], .., slices, unions, filters) on the result. Offline; 200 KB. Price: $0.005 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/json-repair
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The broken JSON (aliases: json, input). Max 200 KB | |
| query | No | Optional JSONPath to evaluate on the repaired value | |
| pretty | No | Also return the repaired JSON pretty-printed (default false) |