All notable changes to this project will be documented in this file.
This project uses date-based versioning: YYYY.MM.DD-N where N is the number of commits since the last release.
This library implements TOON v1.4 specification (2025-11-05).
Key collapsing - New :key-collapsing option for encoding nested single-key objects into dotted paths
{data: {config: {server: "localhost"}}} → data.config.server: localhost:flatten-depth optionPath expansion - New :expand-paths option for decoding dotted keys back to nested objects
:length-marker option from encode API
[N] format for array lengths (no more [#N] syntax):length-marker option is no longer supported-0 to 0 per v1.4 spec requirementcom.vadelabs.toon.decode.parser/number to normalize negative zeroFirst public release! 🎉
A Clojure/ClojureScript implementation of TOON (Token-Oriented Object Notation) - a compact format for passing data to LLMs with significantly fewer tokens than JSON.
Saves tokens when sending structured data to LLMs:
;; Add to deps.edn
com.vadelabs/toon {:mvn/version "2025.11.05-43"}
;; Use it
(require '[com.vadelabs.toon.interface :as toon])
(toon/encode {:users [{:id 1 :name "Alice"} {:id 2 :name "Bob"}]})
;=> "users[2]{id,name}:\n 1,Alice\n 2,Bob"
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |