summary refs log tree commit diff stats
path: root/README.md
blob: 9bb03778b06d879a589b673b01556f9e6be945ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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:

```json
{
  "bar": []
}
```

to successfully deserialize into the Rust struct:

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

as a `foo.bar.is_not()`.