Back to directory

Token-Oriented Object Notation (TOON)

TOON is a compact, human-readable text encoding of the JSON data model, designed to use fewer tokens than JSON when passed to a language model while keeping structure easy to parse and validate.

Token-Oriented Object Notation (TOON)

Token-Oriented Object Notation (TOON) is a compact, human-readable encoding of the JSON data model, built to minimize the tokens a language model spends on structure. It combines YAML-style indentation for nested objects with CSV-style tabular rows for uniform arrays of objects, which is where it saves the most tokens compared with JSON.

A TOON document can declare a field list once in a header line and then list one row per array element, including nested field groups and keyed tabular data such as configuration maps or records addressed by ID. For deeply nested or non-uniform data, the project notes that JSON can still be more efficient.

TOON is meant as a translation layer: an application keeps using JSON internally and encodes it to TOON only for LLM input. It ships as a TypeScript SDK and a command-line tool, with benchmarks comparing token counts against JSON.

More in CLI tools

See all 181
  • grev

    github.com

    A set of Unix coreutils-style filters — grep, sort, cut and more — that answer a plain-language question about each record instead of matching a pattern, using a small decision model.

  • A Node.js script that exports a Google Doc to HTML and CSS with high fidelity, preserving headings, spacing, alignment, bullet lists, images and right-to-left text.

  • gpusched

    github.com

    A VRAM-aware GPU job scheduler for a single machine: declare how much memory each shell command needs, and it places jobs the moment a GPU has room and reports when a guess was wrong.