Expand description
§TSON - Terse JSON Binary Format
A compact binary format for JSON data, designed for microcontrollers and constrained environments.
§Feature flags
std(default on) - enablesstd::io-based helpers and theIoErrorvariant inTsonError. When disabled, the library isno_stdand only requires thealloccrate.json(default on) - enables JSON ↔ TSON compilation viaserde_json.
§Quick start
let json = r#"{"name":"Alice","age":30}"#;
let doc = tson::compile_json(json).unwrap();
let bytes = tson::to_bytes(&doc).unwrap();
let restored = tson::from_bytes(&bytes).unwrap();
let value = tson::decompile_to_value(&restored).unwrap();
assert_eq!(value.to_string(), r#"{"age":30,"name":"Alice"}"#);Re-exports§
pub use stream::TsonStreamReader;pub use tson::decode_definitions;pub use tson::emit_value;pub use tson::from_bytes;pub use tson::to_bytes;pub use tson::TsonChunk;pub use tson::TsonData;pub use tson::TsonDefinition;pub use tson::TsonDocument;pub use tson::TsonHeader;pub use tson::TsonType;pub use tson::emit;pub use tson::emit_with_context;pub use tson::compile_json;pub use tson::compile_json_file;pub use tson::compile_value;pub use tson::decompile_to_value;pub use tson::decompile_tson_file;