Skip to content

possibility to not require JsonTypeInfo annotation for sealed classes? #3596

Open
@pjfanning

Description

@pjfanning

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.xIssues to be only tackled for Jackson 3.x, not 2.x

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions