Skip to main content

Crate tauq

Crate tauq 

Source
Expand description

Tauq (τq) - Token-Efficient Data Notation

A schema-driven data format achieving 44-54% fewer tokens than JSON.

§Example

use tauq::compile_tauq;

let source = r#"
name Alice
age 30
"#;

let json = compile_tauq(source).unwrap();
assert_eq!(json["name"], "Alice");

Re-exports§

pub use error::TauqError;
pub use serde_support::from_bytes;
pub use serde_support::from_file;
pub use serde_support::from_str;
pub use tauq::Delimiter;
pub use tauq::Formatter;
pub use tauq::Lexer;
pub use tauq::Parser;
pub use tauq::StreamingParser;
pub use tauq::json_to_tauq;
pub use tauq::json_to_tauq_optimized;
pub use tauq::json_to_tauq_ultra;
pub use tauq::minify_tauq;

Modules§

c_bindings
C bindings for Tauq
error
Error types for Tauq
serde_support
Serde integration (optional)
tauq
Core Tauq parser and formatter
tbf
Tauq Binary Format (TBF) - high-performance columnar storage Tauq Binary Format (TBF) - State-of-the-Art Binary Serialization

Constants§

MAX_INPUT_SIZE
Maximum input size (100 MB) to prevent DoS via memory exhaustion
MAX_NESTING_DEPTH
Maximum nesting depth for recursive structures

Functions§

compile_tauq
Parse Tauq source to JSON
compile_tauqq
Execute TauqQ (Tauq Query with transformations)
compile_tauqq_safe
Execute TauqQ in safe mode (shell execution disabled) - RECOMMENDED
compile_tauqq_unsafe
Execute TauqQ with shell execution enabled - USE WITH CAUTION
format_to_tauq
Format JSON to Tauq syntax
minify_tauq_str
Minify Tauq to single line
print_error_with_source
Print an error with source code context
process_tauqq
Process TauqQ directives without parsing (returns processed Tauq source)