Skip to content

Empty string results in error #79

@lostb1t

Description

@lostb1t

I have a field defined like this:

    #[serde(default, deserialize_with = "deserialize_option_duration")]
    pub runtime: Option<Duration>,

but when the json string is empty:

"runtime":""

deserialising will fail:

Error("Empty input", line: 1, column: 1678)

I would expect it to set it to None and not fail

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