vicardi

Crates.iovicardi
lib.rsvicardi
version0.2.1
created_at2022-06-06 05:55:58.961349+00
updated_at2025-04-29 06:48:45.934248+00
descriptionJSON VCardArray Generator that uses Serde
homepagehttps://oss.uzinfocom.uz
repositoryhttps://github.com/uzinfocom-org/vicardi
max_upload_size
id600502
size83,493
Orzklv (orzklv)

documentation

README

Uzinfocom's {Vicardi}

jCard (vCard in JSON format) serde serialization and deserialization.

Top Used Language Test CI

About

Our CCTLD-developed system uses the jCard format to communicate with ICANN services. Unfortunately, since there is no jCard serde crate available, we developed our own library and used this library to create an RDAP system that makes the .uz TLD domains in Uzbekistan both fast and robust.

[!NOTE] This library is developed according to the RFC 7483 standard.

While the crate should be fully RFC compliant, please open an issue if you spot anything wrong.

Using Vicardi

use vicardi::*;
use serde_json::json;

fn main() -> anyhow::Result<()> {
    let mut vcard = Vcard::default();
    vcard.push(Property::new_fn("John Doe", None));

    let json = json!([
        "vcard",
        [
            ["version", {}, "text", "4.0"],
            ["fn", {}, "text", "John Doe"]
        ]
    ]);

    let parsed: Vcard = serde_json::from_value(json.clone())?;

    assert_eq!(serde_json::to_value(&vcard)?, json);
    assert_eq!(parsed, vcard);
    Ok(())
}

See the documentation for more details.

License

This library is distributed under the GPL-3.0 license. See the LICENSE for more information!

Uzinfocom's {Vicardi}

Commit count: 46

cargo fmt