BackwardsCompatible serializer uses Comapct and Default serializer. Is there a way to use some other (custom) serializer in there, like CamelCaseSerializer in place of Compact?
Maybe current approach to serializers (modules + SRTP) allows for it, but it is simply too hard for me to reason about.
I think creating a composable serializer would be easy if some common interface for the serializers were introduced (in place of SRTP).
type ISerializer =
abstract member serialize<'T> : 'T->string
// etc.
type FallbackSerializer(main : ISerializer, fallback : ISerializer) =
implement ISerializer with
// etc
What would be the downsides of such approach?
BackwardsCompatibleserializer usesComapctandDefaultserializer. Is there a way to use some other (custom) serializer in there, likeCamelCaseSerializerin place ofCompact?Maybe current approach to serializers (modules + SRTP) allows for it, but it is simply too hard for me to reason about.
I think creating a composable serializer would be easy if some common interface for the serializers were introduced (in place of SRTP).
What would be the downsides of such approach?