-
-
Notifications
You must be signed in to change notification settings - Fork 900
skip_serializing_if is a footgun #1732
Copy link
Copy link
Closed
Description
skip_serializing_if only works if the serialization format is self-describing. It does not work with e.g. bincode. This is a footgun in a codebase that uses more than one serialization format at different points, because I can add skip_serializing_if to something that gets fed into the JSON serializer and it works fine, but when it gets fed into the bincode serializer it produces garbage that will fail to deserialize.
I think the solution here is for Serializers to declare whether or not they support skipping things and then make skip_serializing_if only have an effect for serializers that can tolerate it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels