#serde-yaml #yaml #serialization #deserialize #serde

serde_yaml2

Serde integration for yaml_rust2 crate

3 releases

0.1.2 Jun 15, 2024
0.1.1 Apr 20, 2024
0.1.0 Apr 18, 2024

#722 in Encoding

Download history 92/week @ 2024-07-04 110/week @ 2024-07-11 78/week @ 2024-07-18 62/week @ 2024-07-25 60/week @ 2024-08-01 73/week @ 2024-08-08 49/week @ 2024-08-15 37/week @ 2024-08-22 79/week @ 2024-08-29 39/week @ 2024-09-05 82/week @ 2024-09-12 217/week @ 2024-09-19 149/week @ 2024-09-26 70/week @ 2024-10-03 104/week @ 2024-10-10 99/week @ 2024-10-17

438 downloads per month
Used in 2 crates

MIT/Apache

50KB
1K SLoC

serde_yaml2

This crate provides serde integration for yaml-rust2

Usage

See examples dir for usage examples

Enum representation

Enums are represented using external tagging. For example:

#[derive(Serialize, Debug, PartialEq)]
enum TestEnum {
    VariantA,
    VariantB(i32, f64),
}

will be represented as:

VariantA: ~

or

VariantB: [1, 4.5]

Running tests

Just execute

cargo test

Dependencies

~2.3–3MB
~54K SLoC