Hi. I have an interface `Iface` which is extended ...
# announcements
f
Hi. I have an interface
Iface
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.