I am decoding a message schema that sends an empty string to represent an unset value. As far as I can tell, there is no way to handle this case without creating a custom type and processing in a decode hook. It could also probably be handled with internal fields that are mapped to duplicate external fields in the post_init method. Either way this complicates struct definition and loses some of the performance benefits of the library.
An optional flag to the decoder could make sense for this feature:
Description
I am decoding a message schema that sends an empty string to represent an unset value. As far as I can tell, there is no way to handle this case without creating a custom type and processing in a decode hook. It could also probably be handled with internal fields that are mapped to duplicate external fields in the post_init method. Either way this complicates struct definition and loses some of the performance benefits of the library.
An optional flag to the decoder could make sense for this feature: