Class KotlinSerializationJsonHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<Object>
org.springframework.http.converter.AbstractSmartHttpMessageConverter<Object>
org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter<kotlinx.serialization.json.Json>
org.springframework.http.converter.KotlinSerializationStringHttpMessageConverter<kotlinx.serialization.json.Json>
org.springframework.http.converter.json.KotlinSerializationJsonHttpMessageConverter
- All Implemented Interfaces:
HttpMessageConverter<Object>, SmartHttpMessageConverter<Object>
public class KotlinSerializationJsonHttpMessageConverter
extends KotlinSerializationStringHttpMessageConverter<kotlinx.serialization.json.Json>
Implementation of
HttpMessageConverter
that can read and write JSON using
kotlinx.serialization.
It supports application/json
and application/*+json
with
various character sets, UTF-8
being the default.
As of Spring Framework 7.0, open polymorphism is supported.
- Since:
- 5.3
- Author:
- Andreas Ahlenstorf, Sebastien Deleuze, Juergen Hoeller, Iain Henderson
-
Field Summary
Fields inherited from class AbstractHttpMessageConverter
logger
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a newKotlinSerializationJsonHttpMessageConverter
with the default configuration.KotlinSerializationJsonHttpMessageConverter
(kotlinx.serialization.json.Json json) Construct a newKotlinSerializationJsonHttpMessageConverter
with a custom configuration. -
Method Summary
Methods inherited from class KotlinSerializationStringHttpMessageConverter
readInternal, writeInternal
Methods inherited from class AbstractKotlinSerializationHttpMessageConverter
canRead, canWrite, getSupportedMediaTypes, read, supports, supportsRepeatableWrites, writeInternal
Methods inherited from class AbstractSmartHttpMessageConverter
readInternal, write, writeInternal
Methods inherited from class AbstractHttpMessageConverter
addDefaultHeaders, canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, write
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface HttpMessageConverter
getSupportedMediaTypes
Methods inherited from interface SmartHttpMessageConverter
canRead, canWrite, read, write
-
Constructor Details
-
KotlinSerializationJsonHttpMessageConverter
public KotlinSerializationJsonHttpMessageConverter()Construct a newKotlinSerializationJsonHttpMessageConverter
with the default configuration. -
KotlinSerializationJsonHttpMessageConverter
public KotlinSerializationJsonHttpMessageConverter(kotlinx.serialization.json.Json json) Construct a newKotlinSerializationJsonHttpMessageConverter
with a custom configuration.
-