Skip to content

Provide MediaType to AbstractJacksonHttpMessageConverter.customizeReader #37094

Open

Description

@OrangeDog

I am implementing a CSV message converter by extending AbstractJacksonHttpMessageConverter.

While customizerWriter supplies the target MediaType, customizeReader does not supply the source MediaType.

As a result, I cannot check the "header" parameter to decide the value for CsvSchema.withUseHeader.

A new extension point could be added without breaking anything:

protected ObjectReader customizeReader(
        ObjectReader reader, JavaType javaType, @Nullable MediaType contentType) {

    return customizeReader(reader, javaType);
}

This could also be of general use for other formats, as media types such as application/x-my-thing+json are commonly used, and knowing the base type may be useful in configuring a reader.

Activity

  1. added
    status: waiting-for-triage
    on Jul 30, 2026
  2. arnabnandy7 commented on Jul 31, 2026

    @arnabnandy7

    I'm interested in contributing in this, do assign if selected in triage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: waiting-for-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions