filiplamparski
12/11/2018, 4:01 PMIface
which is extended by a number of data classes (since you can't have an open data class
). The interface is used in another class data class Dclass<out T : Iface>(val ds: List<T>)
. I have Jackson deserializing some JSON into a Dclass
instance. Can I do any better than using @JsonTypeInfo
and @JsonSubTypes
on the interface? I don't like having my superclasses knowing about their subclasses, even if it's just annotations. Yes, I am using the Kotlin extensions to Jackson.