Convert two types into a single type with Serde
Serde supports an interesting selection of attributes that can be used to customize the serialization or deserialization for a type while still using the derived implementation for the most part. In your case, you need to be able to decode a field that can be specified as one of multiple types, and you don’t need … Read more