Skip to content

Overview

LDF, the Language Data Format, is a lossless, line-oriented text encoding of JSON records. It exists for one reader: a language model. A dataset becomes one typed header and one line per record, with child tables for nested arrays, and every value, key and distinction between missing and null survives the round trip. On held-out data Claude Opus 5.5 answers from LDF as well as from JSON (294 of 297 questions each) at 57 to 77 percent of JSON’s input tokens; in Claude Code sessions, JSON tool output reached the model at 0.56 of its tokens with no answer lost.

Two things set it apart from the other compact formats:

  • It is lossless on real data. CSV, TSV and Markdown tables cannot hold nested records and quietly merge a missing field, a null and the string "null". TOON holds nesting but costs more tokens than JSON as soon as records stop being uniform. LDF keeps nesting as child tables and keeps the missing-versus-null distinction as empty cell versus null.
  • Its claims are measured. The format was designed from benchmarks, not taste: deterministic datasets, faithful implementations of the competing formats, exact token counts for two tokenizers, and comprehension runs on four models at three sizes. The misses are in the baseline report, including the one that changed the format.

Specification v0.2 (hoisted arrays, opt-in); releases since then changed the tools, not the format. The crates are at 0.5.0 on crates.io (ldf, ldf-data, ldf-select, ldf-mcp), Rust, MIT or Apache-2.0, source in the repository. The changelog lists every release and the roadmap says what is next.