-
|
I am trying to parse some timestamps that might not be present and trying to use Chancing the Dependencies: In case anyone finds this and wonders how to fix the issue add the attribute |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Deserializing |
Beta Was this translation helpful? Give feedback.
Deserializing
Option<Date>will beNoneif the value isnull(in JSON — other formats have their own equivalents). When this was brought up before, I was unable to find a way to fall back toNoneif the value is not present. You'd have to use#[serde(default)]on the field as well. The name may be different, as I'm typing this from memory.