Skip to content

Add support for FormatFeature extension, for format-specifc Enum-backed parser/generator options #196

@cowtowncoder

Description

@cowtowncoder

Beyond 2.6 it would be good to be able to support format-specific features in generic manner, specifically so that jackson-databind could pass opaque settings. These settings need to be passed to underlying parser (JsonParser) and generator (JsonGenerator) implementations; and due to peculiarities of Java Enums, we can not use base class or enum. Further, although most usage is via databind package, some formats do not depend on it.... so the base interface needs to be within jackson-core.

To that end, it makes sense to:

  1. Add new FormatFeature interface, with basic methods for accessing mask, default state
  2. Add methods in JsonFactory for accessing compatible feature types (for validating type match)
  3. Add placeholder methods in JsonParser for changing feature states
  4. Add placeholder methods in JsonGenerator for changing feature states

Actual full implementations for data format modules may wait until 2.7, although partial implementations may added in 2.6 as long as tight coupling to core 2.6 is avoided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions