Currently, the Serde deserializer in this crate hardcodes specific nullable semantics. Namely, only fields with an empty value are considered missing. But, it is fairly common in CSV formats to use other sentinels, such as "null," even for otherwise non-String fields. It should be possible to augment ReaderBuilder to permit the caller to provide a predicate that determines whether a field value is missing or not.
Once we have the predicate, it should be as simple as plumbing it through and calling it in deserialize_option.
Currently, the Serde deserializer in this crate hardcodes specific nullable semantics. Namely, only fields with an empty value are considered missing. But, it is fairly common in CSV formats to use other sentinels, such as "null," even for otherwise non-String fields. It should be possible to augment
ReaderBuilder
to permit the caller to provide a predicate that determines whether a field value is missing or not.Once we have the predicate, it should be as simple as plumbing it through and calling it in
deserialize_option
.See also https://users.rust-lang.org/t/serde-csv-empty-fields-are-the-string-null/31260 for motivation.