public class KotlinSerializationJsonMessageConverter extends AbstractJsonMessageConverter
MessageConverter
that can read and write JSON
using kotlinx.serialization.
This converter can be used to bind @Serializable
Kotlin classes.
logger
Constructor and Description |
---|
KotlinSerializationJsonMessageConverter()
Construct a new
KotlinSerializationJsonMessageConverter with default configuration. |
KotlinSerializationJsonMessageConverter(kotlinx.serialization.json.Json json)
Construct a new
KotlinSerializationJsonMessageConverter with the given delegate. |
Modifier and Type | Method and Description |
---|---|
protected Object |
fromJson(Reader reader,
Type resolvedType) |
protected Object |
fromJson(String payload,
Type resolvedType) |
protected String |
toJson(Object payload,
Type resolvedType) |
protected void |
toJson(Object payload,
Type resolvedType,
Writer writer) |
convertFromInternal, convertToInternal, supports
addSupportedMimeTypes, canConvertFrom, canConvertTo, fromMessage, fromMessage, getContentTypeResolver, getDefaultContentType, getMimeType, getSerializedPayloadClass, getSupportedMimeTypes, isStrictContentTypeMatch, setContentTypeResolver, setSerializedPayloadClass, setStrictContentTypeMatch, supportsMimeType, toMessage, toMessage
public KotlinSerializationJsonMessageConverter()
KotlinSerializationJsonMessageConverter
with default configuration.public KotlinSerializationJsonMessageConverter(kotlinx.serialization.json.Json json)
KotlinSerializationJsonMessageConverter
with the given delegate.json
- the Json instance to useprotected Object fromJson(Reader reader, Type resolvedType)
fromJson
in class AbstractJsonMessageConverter
protected Object fromJson(String payload, Type resolvedType)
fromJson
in class AbstractJsonMessageConverter
protected void toJson(Object payload, Type resolvedType, Writer writer)
toJson
in class AbstractJsonMessageConverter
protected String toJson(Object payload, Type resolvedType)
toJson
in class AbstractJsonMessageConverter