Hi guys, trying to do map to a sealed class / data...
# jackson-kotlin
r
Hi guys, trying to do map to a sealed class / data class structure, which is something I am used to from Scala. For example, when attempting to map from Json to something like:
Copy code
sealed class ExampleClass {
  data class ExampleFirst(val id: Int, val name: String)
  data class ExampleAlternative(val other: String)
}
Jackson returns a
InvalidDefinitionException
and mentions that it cannot constrict an
ExampleClass
as no Creators exist. I imagine there is a simple annotation to get around this, but my googlefoo is failing me.