1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! # TOON Format - Token-Oriented Object Notation
//!
//! A Rust implementation of the TOON (Token-Oriented Object Notation) format.
//! TOON is a compact, human-readable serialization format designed to minimize
//! tokens when sending structured data to Large Language Models (LLMs).
//!
//! ## Quick Start
//!
//! ```rust
//! use toon_format_rs::{parse, to_string, Value};
//!
//! // Parse TOON string
//! let input = r#"id: 123
//! name: Alice
//! active: true"#;
//!
//! let value = parse(input).unwrap();
//! assert_eq!(value.get("id").unwrap().as_i64(), Some(123));
//!
//! // Serialize to TOON
//! let output = to_string(&value).unwrap();
//! assert!(output.contains("id: 123"));
//! ```
//!
//! ## Features
//!
//! - **Compact**: 30-60% fewer tokens than JSON for uniform arrays
//! - **Human-readable**: YAML-like indentation with CSV-like tabular arrays
//! - **Schema-aware**: Explicit array lengths and field lists
//! - **Lossless**: Convert JSON → TOON → JSON without data loss
//! - **LLM-optimized**: Designed specifically for LLM prompts
// Re-export main types
pub use ;
pub use ;
pub use ;
pub use ;
pub use Value;
pub use ;