| Crates.io | xcdn |
| lib.rs | xcdn |
| version | 0.1.0 |
| created_at | 2025-12-07 21:26:35.596257+00 |
| updated_at | 2025-12-07 21:26:35.596257+00 |
| description | A complete Rust library to parse, serialize and deserialize xCDN (eXtensible Cognitive Data Notation). |
| homepage | https://github.com/gslf/xCDN |
| repository | https://github.com/gslf/xCDN |
| max_upload_size | |
| id | 1972257 |
| size | 77,851 |
A complete Rust library to parse, serialize and deserialize > xCDN_ — eXtensible Cognitive Data Notation.
What is > xCDN_?
xCDN_is a human-first, machine-optimized data notation with native types, tags and annotations. It supports comments, trailing commas, unquoted keys and multi‑line strings. You can read more about this notation in the > xCDN_ repository.
$schema: "...", …)Decimal (d"..."), UUID (u"..."), DateTime (t"..." RFC3339),
Duration (r"..." ISO8601), Bytes (b"..." Base64)#tags and @annotations(args?) that decorate any value// and /* ... */serde bridge for Value$schema: "https://gslf.github.io/xCDN/schemas/v1/meta.xcdn",
server_config: {
host: "localhost",
// Unquoted keys & trailing commas? Yes.
ports: [8080, 9090,],
// Native Decimals & ISO8601 Duration
timeout: r"PT30S",
max_cost: d"19.99",
// Semantic Tagging
admin: #user {
id: u"550e8400-e29b-41d4-a716-446655440000",
role: "superuser"
},
// Binary data handling
icon: @mime("image/png") b"iVBORw0KGgoAAAANSUhEUgAAAAUA...",
}
use xcdn::{parse_str, ser::to_string_pretty};
let doc = parse_str(include_str!("../tests/data/sample.xcdn")).unwrap();
let text = to_string_pretty(&doc).unwrap();
println!("{}", text);
MIT, see LICENSE.