ootle_serde
serde helper modules for the Tari Ootle codebase. Each module is designed for
use with #[serde(with = "…")] and switches automatically between a
human-readable form (JSON) and a compact binary form (CBOR, MessagePack, etc.)
based on Serializer::is_human_readable.
Modules
| Module | Feature | Human-readable | Binary |
|---|---|---|---|
hex |
hex |
hex string | raw bytes |
base64 |
base64 |
base64 string | raw bytes |
string |
— | ToString / FromStr |
native Serialize/Deserialize |
map |
— | array of [key, value] pairs |
native map |
duration::seconds |
— | integer seconds | integer seconds |
cbor_value |
cbor |
— | CBOR value helpers |
Example
use ;
License
BSD-3-Clause. Copyright 2026 The Tari Project.