Open dns2utf8 opened 2 months ago
Name | Link |
---|---|
Latest commit | 8a4e39fbdc2ecde59b54d11f1bbd2e485a342ee7 |
Latest deploy log | https://app.netlify.com/sites/cute-starship-2d9c9b/deploys/66e9ef813065fd000860938f |
Does this also fix the #[serde(skip)]
attribute ? or is it only targetted to skip_serializing_if
?
It works with skip
, but it serialized it to a None
, so I am not sure what happens if your type is not Option<T>
Hi all
I made this PR to support maybe skipped fields, either always or dynamically with
#[serde(skip_serializing_if = "Option::is_none")]
.I have considered hiding the function behind a feature flag and adding a runtime Err without the flag so consumers of the crate notice that they were trying to serialize an object that would not be readable again.
Looking forward hearing from you, Stefan
PS: I assume that
None::<()>
takes the same amount of space asNone::<u128>
or something else would and that trick then allows us to stay with the wire format, 99% sure of that, happy to learn :blush: