We could have types for marking the different serialization variants in the typesystem.
For json, we could have a tagged String type Json and for boopickle a tagged ByteBuffer Boopickle. This way, it is much more explicit when requiring a Serializer[Json] instead of just a Serializer[String].
We could have types for marking the different serialization variants in the typesystem.
For json, we could have a tagged String type
Jsonand for boopickle a tagged ByteBufferBoopickle. This way, it is much more explicit when requiring aSerializer[Json]instead of just aSerializer[String].