Deprecate MediaType.APPLICATION_JSON_UTF8
This commit deprecates MediaType.APPLICATION_JSON_UTF8 and MediaType.APPLICATION_PROBLEM_JSON_UTF8 in favor of MediaType.APPLICATION_JSON and MediaType.APPLICATION_PROBLEM_JSON since UTF-8 encoding is now handled correctly by most browsers (related bug has been fixed in Chrome since September 2017). MediaType.APPLICATION_JSON is now used as the default JSON content type. Closes gh-22788
This commit is contained in:
@@ -22,7 +22,6 @@ import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
import java.lang.reflect.Type;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
@@ -74,7 +73,7 @@ public class MappingJackson2MessageConverter extends AbstractMessageConverter {
|
||||
* the {@code application/json} MIME type with {@code UTF-8} character set.
|
||||
*/
|
||||
public MappingJackson2MessageConverter() {
|
||||
super(new MimeType("application", "json", StandardCharsets.UTF_8));
|
||||
super(new MimeType("application", "json"));
|
||||
this.objectMapper = initObjectMapper();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user