i have a public interface with properties in module A, a private data class implementing the interface in module B, and in module C (the only one I control) i need to create a serializer for the interface type (for encoding only). Are my only options a manually-written serializer for the interface or a surrogate? i really would like to avoid having to maintain a hand-written serializer but also would like the serialize without extra allocation of surrogates for every instance in the outgoing tree.
My dream would be external seriazation generation through
@Serializer(forClass=)
but for an interface where the generated decoder throws UOE, or I could manually override decode and throw UOE