iri-rs 3.3.2

Allocation-conscious URI/IRI (RFC 3986/3987) parser, resolver and normalizer with borrowed and owned types, optional compile-time macros and vocabulary enums.
Documentation
use iri_rs::{IriBuf, IriRefBuf};
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
struct Foo {
    iri: IriBuf,
}

#[derive(Debug, Serialize, Deserialize)]
struct Bar {
    iri_ref: IriRefBuf,
}

fn main() {
    let foo: Foo = serde_json::from_str("{ \"iri\": \"https://example.org/foo\" }").unwrap();
    let bar: Bar = serde_json::from_str("{ \"iri_ref\": \"../bar\" }").unwrap();

    eprintln!("{:?}", foo);
    eprintln!("{:?}", bar);
}