toon_format 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

Functions

decode(String input, {Map<String, dynamic>? options}) → dynamic
Decodes a TOON-formatted string to a Dart value.
encode(dynamic value, {Map<String, dynamic>? options}) String
Encodes a value to TOON format.