#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

#713 in Encoding

Download history 54/week @ 2024-07-28 75/week @ 2024-08-04 57/week @ 2024-08-11 48/week @ 2024-08-18 35/week @ 2024-08-25 86/week @ 2024-09-01 35/week @ 2024-09-08 163/week @ 2024-09-15 218/week @ 2024-09-22 87/week @ 2024-09-29 67/week @ 2024-10-06 137/week @ 2024-10-13 86/week @ 2024-10-20 67/week @ 2024-10-27 127/week @ 2024-11-03 145/week @ 2024-11-10

442 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.4–3MB
~55K SLoC