Class KotlinSerializationJsonHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<T>
org.springframework.http.converter.AbstractSmartHttpMessageConverter<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:
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.
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
ConstructorsConstructorDescriptionConstruct a newKotlinSerializationJsonHttpMessageConverterwith the default configuration.KotlinSerializationJsonHttpMessageConverter(kotlinx.serialization.json.Json json) Construct a newKotlinSerializationJsonHttpMessageConverterwith a custom configuration. -
Method Summary
Methods inherited from class org.springframework.http.converter.KotlinSerializationStringHttpMessageConverter
readInternal, writeInternalMethods inherited from class org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter
canRead, canWrite, read, supports, supportsRepeatableWrites, writeInternalMethods inherited from class org.springframework.http.converter.AbstractSmartHttpMessageConverter
readInternal, write, writeInternalMethods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
addDefaultHeaders, canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.http.converter.HttpMessageConverter
getSupportedMediaTypes, getSupportedMediaTypesMethods inherited from interface org.springframework.http.converter.SmartHttpMessageConverter
canRead, canWrite, read, write
-
Constructor Details
-
KotlinSerializationJsonHttpMessageConverter
public KotlinSerializationJsonHttpMessageConverter()Construct a newKotlinSerializationJsonHttpMessageConverterwith the default configuration. -
KotlinSerializationJsonHttpMessageConverter
public KotlinSerializationJsonHttpMessageConverter(kotlinx.serialization.json.Json json) Construct a newKotlinSerializationJsonHttpMessageConverterwith a custom configuration.
-