Skip to content

Add "abstract type mapping" for deserialization from Map<ENUMTYPE,V> into EnumMap (and Set<ENUMTYPE> to EnumSet<EnumType>) #1883

Closed
@cowtowncoder

Description

@cowtowncoder

(see #1882 for background)

Currently Map type is mapped, during deserialization, into concrete type to use, default being LinkedHashMap. This works fine in general but in specific case of enum type being used for key, it seems useful to instead map it into EnumMap: this is more efficient type to use and likely what users would prefer (or at very least not mind).
Users may still specify more specific type, like concrete type, to avoid this mapping; it only applies to general references to Map type.

Since this does change observed behavior slightly, it needs to go in next minor or major release: given that 2.9 is the last minor release (very likely) from 2.x, this means 3.0.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions