zoon-rust
A Rust implementation of ZOON (Zero Overhead Object Notation) - the most token-efficient data format for LLMs.
Installation
Add to your Cargo.toml:
[]
= "1.0"
Usage
Encoding
use encode;
use Serialize;
Decoding
use decode;
use Deserialize;
API
| Function | Description |
|---|---|
encode<T: Serialize>(value: &T) -> Result<String> |
Encode any serializable value to ZOON |
decode<T: DeserializeOwned>(input: &str) -> Result<T> |
Decode ZOON into a value |
Type Mapping
| Rust Type | ZOON Type | Header |
|---|---|---|
i32, i64 |
Integer | :i |
bool |
Boolean | :b |
String |
String | :s |
Option<T> (None) |
Null | ~ |
| Auto-increment ID | Implicit | :i+ |
License
MIT License. © 2025-PRESENT Carsen Klock.