You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default jackson defines subtypes for discriminated unions using @JsonSubTypes-annotation. Jackson-module-kotlin allows lighter syntax by reading subclasses directly from sealed class using reflection. Same information could be used by apina but it needs to be read from the bytecode instead relying on kotlin-reflection.
Now that I look at this closer, this might be quite easy to do even without access to Kotlin's own metadata. If we have @JsonTypeInfo without, @JsonSubTypes, we could just search all of the classes in the same package for subclasses. The subclasses of a sealed class need to be in the same file, which means that they will have the same package.
By default jackson defines subtypes for discriminated unions using @JsonSubTypes-annotation. Jackson-module-kotlin allows lighter syntax by reading subclasses directly from sealed class using reflection. Same information could be used by apina but it needs to be read from the bytecode instead relying on kotlin-reflection.
FasterXML/jackson-module-kotlin#239
The text was updated successfully, but these errors were encountered: