Format JSON payload
format_json_payloadClean up and pretty-print JSON from Markdown code fences or surrounding prose, remove trailing commas, and report cleanup details while preserving values.
Instructions
Clean up and pretty-print a JSON object or array. Accepts a JSON code fence or surrounding prose and removes trailing commas, while preserving JSON values and reporting cleanup details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| indent | No | Number of spaces for indentation; use 0 for compact JSON. | |
| payload | Yes | JSON text, optionally inside a Markdown code fence or surrounded by prose. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formattedJson | Yes | ||
| removedTrailingCommas | Yes | ||
| extractedFromSurroundingText | Yes |