Matthew Cachia
02/26/2021, 7:27 AMKlaxon
instance inside the converter? The job of the converter is to assemble the right Either construct, and therefore I'd like to delegate the deserialising of those two complex classes back into Klaxon.
class EitherConverter(val klaxon: Klaxon): Converter {
override fun canConvert(cls: Class<*>) = ???
override fun fromJson(jv: JsonValue) = ???
override fun toJson(o: Any) = ???
}
Is this the right approach? Are there better alternatives?
Thank you everyone.