提交 b61643b7 编写于 作者: A Arjen Poutsma

Support UTF-16/UTF-32 in Jackson message converter

This commit makes sure that we let Jackson deal with all the encodings
that it supports, including UTF-16 and UTF-32.

Closes gh-26627
上级 7efb4ead
......@@ -357,7 +357,9 @@ public abstract class AbstractJackson2HttpMessageConverter extends AbstractGener
ObjectMapper objectMapper = selectObjectMapper(javaType.getRawClass(), contentType);
Assert.state(objectMapper != null, "No ObjectMapper for " + javaType);
boolean isUnicode = ENCODINGS.containsKey(charset.name());
boolean isUnicode = ENCODINGS.containsKey(charset.name()) ||
"UTF-16".equals(charset.name()) ||
"UTF-32".equals(charset.name());
try {
if (inputMessage instanceof MappingJacksonInputMessage) {
Class<?> deserializationView = ((MappingJacksonInputMessage) inputMessage).getDeserializationView();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册