#serialization #serde-yaml #yaml #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

#701 in Encoding

Download history 20512/week @ 2025-01-10 9398/week @ 2025-01-17 9968/week @ 2025-01-24 9578/week @ 2025-01-31 12287/week @ 2025-02-07 9790/week @ 2025-02-14 19526/week @ 2025-02-21 16017/week @ 2025-02-28 19867/week @ 2025-03-07 14348/week @ 2025-03-14 14585/week @ 2025-03-21 11768/week @ 2025-03-28 15363/week @ 2025-04-04 21637/week @ 2025-04-11 44905/week @ 2025-04-18 16959/week @ 2025-04-25

100,119 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

~3MB
~55K SLoC