2 releases
0.0.2 | Dec 4, 2020 |
---|---|
0.0.1 | Dec 4, 2020 |
#78 in #alias
2,752 downloads per month
Used in 5 crates
(3 directly)
8KB
135 lines
serde_alias
An attribute macro to add deserializing serde casing aliases for all fields in a struct
Simply list which aliase casing types should be applied
extern crate serde_alias;
use serde::{Deserialize};
use serde_alias::serde_alias;
#[serde_alias(
CamelCase,
PascalCase,
LowerCase,
UpperCase,
SnakeCase,
ScreamingSnakeCase,
KebabCase,
ScreamingKebabCase
)]
#[derive(Deserialize)]
struct Foo {
bar: String,
}
Dependencies
~1.5MB
~38K SLoC