o192 0.2.2

ORION-192: ordered, resilient, independent, URL-safe 192-bit IDs for distributed systems.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Smoke test for the optional `serde` feature.

#![cfg(feature = "serde")]

use o192::parse;

#[test]
fn parsed_orion_id_roundtrips_through_json() {
    let view = parse("0007MxpLW00lEG0H8ZD4LMPsY9bfjxoT", 0).unwrap();
    let json = serde_json::to_string(&view).unwrap();
    let back: o192::ParsedOrionId = serde_json::from_str(&json).unwrap();
    assert_eq!(back, view);
}