Implement is_human_readable to return false#5
Conversation
Currently, [is_human_readable](https://docs.rs/serde/latest/serde/trait.Serializer.html#method.is_human_readable) is not manually implemented and thus returns `true` (default). As a consequence, types supporting a more compact binary representation are serialized inefficiently (typically into a string representation). This is a breaking change: previously serialized types supporting a compact representation will fail at deserialization with this commit.
|
I see. As far as I understand, this is only an issue for formats that use multiple intermediate representations during serialization: E.g. a date type which could either use:
The intermediate representation is selected by |
Correct. It depends on the This might or might not cause compatibility issues depending on whether downstream user used such a type. The library version number should be bumped appropriately. |
|
Merged and published. Thank you very much! 😊 |
Currently, is_human_readable is not manually implemented and thus returns
true(default). As a consequence, types supporting a more compact binary representation are serialized inefficiently (typically into a string representation).This is a breaking change: previously serialized types supporting a compact representation will fail at deserialization with this commit.
This is an issue preventing adoption by some projects.