Class KotlinSerializationJsonHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<T>
org.springframework.http.converter.AbstractGenericHttpMessageConverter<Object>
org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter<T>
org.springframework.http.converter.KotlinSerializationStringHttpMessageConverter<kotlinx.serialization.json.Json>
org.springframework.http.converter.json.KotlinSerializationJsonHttpMessageConverter
- All Implemented Interfaces:
GenericHttpMessageConverter<Object>
,HttpMessageConverter<Object>
public class KotlinSerializationJsonHttpMessageConverter
extends KotlinSerializationStringHttpMessageConverter<kotlinx.serialization.json.Json>
Implementation of
HttpMessageConverter
that can read and write JSON using
kotlinx.serialization.
This converter can be used to bind @Serializable
Kotlin classes,
open polymorphic serialization
is not supported.
It supports application/json
and application/*+json
with
various character sets, UTF-8
being the default.
- Since:
- 5.3
- Author:
- Andreas Ahlenstorf, Sebastien Deleuze, Juergen Hoeller, Iain Henderson
-
Field Summary
Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
logger
-
Constructor Summary
ConstructorDescriptionConstruct 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 org.springframework.http.converter.KotlinSerializationStringHttpMessageConverter
readInternal, writeInternal
Methods inherited from class org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter
canRead, canWrite, read, readInternal, supports, writeInternal
Methods inherited from class org.springframework.http.converter.AbstractGenericHttpMessageConverter
write, writeInternal
Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
addDefaultHeaders, canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.http.converter.HttpMessageConverter
canRead, canWrite, getSupportedMediaTypes, getSupportedMediaTypes, 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.
-