Skip to content

Question: how to apply deserialize_struct_case_insensitive to a struct? #7

@jlgerber

Description

@jlgerber

I am a bit confused by deserialize_struct_case_insensitive. It is categorized as a container_attribute in serde-aux's docs. However, the example seems to show it used as a field attribute. If it is a container_attribute, should I be able to do something like this?

#[derive(PartialEq, Eq, PartialOrd, Ord, Deserialize)]
#[serde(deserialize_with = "deserialize_struct_case_insensitive")]
pub struct Manifest {
    name: String,
    version: String,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions