uor-addr 0.2.0

UOR-ADDR — the typed reference vocabulary for content-addressing across recursively-grammared formats. Standard-library Layer-3 Prism realization of the UOR Foundation; ships the common architectural surface plus the JSON realization under JCS-RFC8785 + NFC + SHA-256.
Documentation
//! 01 — Address a JSON value.
//!
//! The minimal use case: take a raw JSON byte sequence and emit the
//! 71-byte `sha256:<64hex>` wire-format content address.
//!
//! Run:
//!
//! ```bash
//! cargo run -p uor-addr --example address_value
//! ```

use uor_addr::json::address;

fn main() {
    let inputs: &[&[u8]] = &[
        br#"{"hello":"world"}"#,
        br#"["chain", "agnostic", "content", "address"]"#,
        b"42",
        b"null",
        br#"{"nested":{"deep":{"value":"found"}}}"#,
    ];

    println!("uor-addr — content addresses\n");
    for raw in inputs {
        let outcome = address(raw).expect("valid JSON within typed-input bounds");
        let label = &outcome.address;
        println!("  input:   {}", std::str::from_utf8(raw).unwrap());
        println!("  address: {label}");
        println!("  width:   {} bytes\n", label.len());
    }
}