encode_toon
Convert JSON data into compact TOON format to reduce token usage in LLM prompts.
Instructions
Convert JSON data into compact TOON format to save tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The JSON data (as a string) to encode into TOON format. | |
| indent | No | Number of spaces for indentation. Defaults to 2. | |
| replacer | No | Array of properties to include in the output. If not provided, all properties are included. | |
| delimiter | No | Delimiter for array values (comma, tab, or pipe). Defaults to comma. | |
| keyFolding | No | Collapse single-key wrapper chains into dotted paths. Defaults to 'off'. | |
| flattenDepth | No | Maximum depth for key folding. Defaults to Infinity. |