json_format
Parse and reformat JSON strings. Choose indent level to pretty-print, validate, or minify JSON.
Instructions
Parse and reformat a JSON string with a configurable indent level (0 = minified, 2 = standard pretty-print). Returns the reformatted JSON string, or an error if the input is not valid JSON. Has no side effects. Use to pretty-print, validate, or minify JSON. Do NOT use to query or transform JSON values — use json_query instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The JSON string to parse and reformat. | |
| indent | No | Indentation spaces (0–8). 0 = minified. Default 2. |