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
Currently there are three ways to customize how a type gets serialized: toString/fromString, toJson/fromJson and toBson/fromBson
It would be nice to have a way to customize the result without using a specialized output format. An idea could be to support arbitrary T serialize() and deserialize(T) methods, where T is the representation type that gets serialized.
Implemented by 7d22466. Possibly there is still a better name than toSerializedValue.
@UplinkCoder, I think I just didn't express myself well. This not about serialization per se, but about defining a different representation of a value, that forms the basis for serialization.
Currently there are three ways to customize how a type gets serialized:
toString/fromString
,toJson/fromJson
andtoBson/fromBson
It would be nice to have a way to customize the result without using a specialized output format. An idea could be to support arbitrary
T serialize()
anddeserialize(T)
methods, whereT
is the representation type that gets serialized.See also #617
The text was updated successfully, but these errors were encountered: