🪪 | JSON VCard Generation with Serde Serialization & Deserialization [maintainer=@orzklv] https://crates.io/crates/vicardi
  • Rust 97.6%
  • Nix 2.4%
Find a file
2025-04-29 11:47:28 +05:00
.github chore: normal readme 2025-04-26 10:08:11 +05:00
src fix: (cargo doc) escape character 2025-04-29 11:47:18 +05:00
.envrc fix: direnv by default 2025-04-26 09:52:35 +05:00
.gitignore fix: direnv by default 2025-04-26 09:52:35 +05:00
Cargo.toml chore: bumping version 2025-04-29 11:47:28 +05:00
flake.lock fix: make flake compatible with default systems 2025-04-26 09:52:12 +05:00
flake.nix fix: make flake compatible with default systems 2025-04-26 09:52:12 +05:00
LICENSE fix: license reference 2025-04-26 10:09:07 +05:00
README.md chore: normal readme 2025-04-26 10:08:11 +05:00

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}