serde-util 0.2.0

Soni's Serde Utilities
Documentation

Soni's Serde Utilities

This crate provides some utilities for use with serde.

Currently, it provides MayBe<T>, a deserializable that doesn't error if something doesn't match a T. For example, it enables the JSON:

{
  "bar": []
}

to successfully deserialize into the Rust struct:

#[derive(Deserialize)]
struct Foo {
  bar: MayBe<f64>,
}

as a foo.bar.is_not().