Skip to content

Narrow types to format specific (e.g. CBORMapper) when resolving via JAX-RS Providers  #36

@kdubb

Description

@kdubb

Currently, JacoksonCBORProvider (maybe others) use ObjectMapper when resolving the mapper via the JAX-RS Provider functionality. This leads to it choosing JSON (via default ObjectMapper) in a variety of ways, none of which Jackson can assume all the blame for.

Using CBORMapper (or other specific derivations) would allow much easier selection of mappers for media types without them getting confused. Notably, JacksonYAMLProvider already does this, resolving specifically a YAMLMapper.

The use case is motivated by our recent breakage revelation that our custom configured CBORMapper was not being applied even though we register a ContextResolver for CBORMapper; the use of ObjectMapper during resolution fails to find it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions