Skip to content

Support Type Id mappings where two ids map to same Class #312

@cowtowncoder

Description

@cowtowncoder

Currently default type id handlers do require mapping between ids and types (Classes) to be bijective; that is, neither side can have duplicates. This makes sense if both serialization and deserialization is required; if there are multiple choices, mapping would be ambiguous.

But for cases where Jackson is only used for deserializing, it may be useful to map more than one type id to a single class. It would be good if default type id serializer could support such usage; it is acceptable (and desirable) to throw an exception if such mapping was being used for serialization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions