miniserde 0.1.45

Data structure serialization library with several opposite design goals from Serde.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use miniserde::{json, Deserialize};

#[derive(Deserialize, PartialEq, Debug)]
pub struct Point {
    pub x: u32,
    pub y: u32,
}

#[test]
fn main() {
    let actual = json::from_str::<Point>(r#"{"x": 1, "y": 2, "z": 3}"#).unwrap();
    let expected = Point { x: 1, y: 2 };
    assert_eq!(actual, expected);
}