You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The serializers library started to become a bit unruly:
The naming convention is not standardized
Deserializer functions for Option<T> versions of different types were created when not necessary
The serializers library should focus on implementing custom ser/de for primitives and complex types that are not implemented by the source code. Things like i64 to String or time::Duration`` to a String that holds the duration in nanoseconds. These should be implemented as functions that can be used in annotation (with=ordeserialize_with=`.)
Custom implementation for custom types should reside with the type and not in the serializers library. (For example CommitSig.)
Together with putting everything in its place, the custom types that need deserialization should deserialize into a type that's easy to use for the developer. The Go types are not necessarily the best mirrored in Rust. Find the Rust-native implementations and make sure that custom serialization can make it compatible with the specification. (Try to separate the issue of serialization from the daily use of the type.)
The text was updated successfully, but these errors were encountered:
@greg-szabo I think all issues mentioned in the opening comment are addressed for now? And there is also a high-level serialization issue about the different kinds of serialization and overall structure #197. Feel free to re-open if I'm missing sth here.
The
serializers
library started to become a bit unruly:Option<T>
versions of different types were created when not necessaryThe serializers library should focus on implementing custom ser/de for primitives and complex types that are not implemented by the source code. Things like
i64
toString
ortime::Duration`` to a String that holds the duration in nanoseconds. These should be implemented as functions that can be used in annotation (
with=or
deserialize_with=`.)Custom implementation for custom types should reside with the type and not in the serializers library. (For example
CommitSig
.)Together with putting everything in its place, the custom types that need deserialization should deserialize into a type that's easy to use for the developer. The Go types are not necessarily the best mirrored in Rust. Find the Rust-native implementations and make sure that custom serialization can make it compatible with the specification. (Try to separate the issue of serialization from the daily use of the type.)
The text was updated successfully, but these errors were encountered: