toon_x_json library

Token-Oriented Object Notation (TOON) encoder and decoder for Dart.

TOON is a compact, human-readable format designed for passing structured data to Large Language Models with significantly reduced token usage.

This package is currently under development. For specification, see: https://github.com/johannschopplich/toon/blob/main/SPEC.md

Classes

DecodeOptions
Options for decoding from TOON format.
EncodeOptions
Options for encoding to TOON format.

Functions

decode(String input, {DecodeOptions? options}) Object?
Decodes a TOON-formatted string to a Dart value.
encode(Object? value, {EncodeOptions? options}) String
Encodes a value to TOON format.