Crates.io | serde_alias |
lib.rs | serde_alias |
version | 0.0.2 |
source | src |
created_at | 2020-12-04 13:41:09.336839 |
updated_at | 2020-12-04 16:01:32.598296 |
description | An attribute macro to apply serde aliases to all struct fields |
homepage | |
repository | https://github.com/petar-dambovaliev/serde_alias |
max_upload_size | |
id | 319633 |
size | 8,909 |
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,
}