serde-toon-rs

Crates.ioserde-toon-rs
lib.rsserde-toon-rs
version0.0.1
created_at2025-11-17 03:31:08.447559+00
updated_at2025-11-17 03:31:08.447559+00
descriptionTOON - Token Oriented Object Notation
homepage
repository
max_upload_size
id1936193
size18,319
Mykhailo Krainik (mykhailokrainik)

documentation

README

TOON - Token Oriented Object Notation

A Rust implementation of Token-Oriented Object Notation (TOON). Compact, human-readable, schema-aware JSON for LLM prompts

Overview

TOON blends YAML-like indentation for nested structures with a table-style layout, similar to CSV, for handling uniform arrays. It works best when you have arrays of objects that all share the same shape (multiple fields per row, consistent columns), giving you CSV-level compactness while still providing explicit structure that makes it easier for LLMs to parse and validate data. For highly nested or irregular data, plain JSON can still be the better fit.

The CSV resemblance is deliberate: CSV is everywhere and easy to reason about, and TOON builds on that familiarity while staying a lossless, drop-in encoding of JSON tailored for Large Language Models.

Installation

Add this to your Cargo.toml:

Commit count: 0

cargo fmt