Skip to content

AbstractJackson2HttpMessageConverter - Check for encoding breaks JSON to POJO de-serialization experience #25247

@kruegsch

Description

@kruegsch

Affects: 5.2.7 (Spring Boot 2.3.1)

Due to a fix in Issue #25076
the AbstractJackson2HttpMessageConverter also blocks the out-of-the-box JSON to POJO de-serialization for responses with an encoding/character set not being unicode.

In our case a GET request to https://appleid.apple.com/auth/keys responses with a
Content-Type: application/json;charset=ISO-8859-1, which results now in
org.springframework.web.client.UnknownContentTypeException: Could not extract response: no suitable HttpMessageConverter found for response type [class x.y.z.AppleKeyRequest] and content type [application/json;charset=ISO-8859-1].

It would be nice to have an option to include non compliant JSON encodings for the given default converters or to have the encoding check as opt-in to be on par with previous default behavior.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions