You need to sign in or sign up before continuing

A little question: I have a json document storing datetime as "2024-01-23T09:50" . Deserialization with serde to chrono::NaiveDateTime fails because it expects seconds which are missing. Do I really have to implement my custom Deserializer module with #[serde(with = "my_date_format")] or is there a more straightforward way?

Edit: playground example: play.rust-lang.org/?version=st

1
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Replies