FasterXML / FasterXML/jackson-databind
possibility to not require JsonTypeInfo annotation for sealed classes?
Open
3.x
polymorphic-handling
- Dominant language
- Java
- Stars
- 3.7k
- Forks
- 1.5k
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 28
Description
Scala, Kotlin and Java 17 have sealed classes. It is possible to write introspectors that find the subtypes.
It would be great if jackson-databind could infer a default JsonTypeInfo setting for sealed traits/interfaces/abstract-classes
A default like this, perhaps:
```
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
```
* https://github.com/pjfanning/jackson-scala-reflect-extensions/pull/9
* https://github.com/FasterXML/jackson-databind/pull/3549
* https://kotlinlang.org/docs/sealed-classes.html
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.