Use human_readble = false throughout all serializers, deserializers
At the moment, the flag is inconsistently set to false in some places. It defaults to true in Serde, but may lead to larger than required files.
What is the effect for commonly used packages?
- chrono
- uuid
- bigdecimal, ...
I am now interested in this, I think it is serializing our timestamp (ns since epoch) time as a String because of this...?
I assume you have some kind of chrono or jiff type somewhere, right?
- Chrono always serializes its
DateTimetype as string (source). - Jiff as well (source).
- UUID changes its representation (source)
So the behavior depends a bit on how your timestamps are represented.
We have our own which changes how it serializes based on that flag. For now, I have done an .overwrite to TimeStamp(Nanoseconds, Some("UTC")) which seems reasonable...
This came up in another newtype that we have, it seemed to be getting serialized as a string instead of an integer based on a branch on human_readable in the impl Serialize.
The inconsistency is not great. However the bigger issue for me here is that I don't know what the default should be.