Encode a document to TOON
demo_encode_toonConverts a JSON document into TOON format and returns the encoded text. Use when you need the encoded form alone.
Instructions
Converts a JSON document into TOON, the line-oriented format mcptoon can serve in place of JSON, and returns the encoded text. Use it when you need the encoded form by itself; to see it next to the other formats with savings percentages use compare_formats, and to read such text back use decode_toon. ...
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | A complete JSON document serialised as text; keys with embedded newlines or unescaped quotes are escaped rather than rejected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toon | Yes | The TOON encoding, previewed past 500 characters. | |
| chars | Yes | Length of the full encoding, preview or not. | |
| truncated | Yes | Whether the text above was cut for transport. |