Marc Knaup
12/11/2020, 1:13 PMinterface? That is, without adding any support for serialization to the implementing class, and when deserializing have the compiler generate an object that implements the interface.
@Serializable
interface Foo {
val bar1: String
val bar2: Int
}
Should serialize too {"bar1":"…","bar2":…} independent of the implementing class.
{"bar1":"abc","bar2":42} should deserialize to object : Foo { override val bar1 = "abc"; override val bar2 = 42 }.Nikky
12/11/2020, 2:33 PM@SerializableInterface annotation and generates a @Serlaizable data class for them as well as extensions for serializer() and suchMarc Knaup
12/11/2020, 3:27 PM