Class KotlinSerializationJsonEncoder
java.lang.Object
org.springframework.http.codec.KotlinSerializationSupport<T>
org.springframework.http.codec.KotlinSerializationStringEncoder<kotlinx.serialization.json.Json>
org.springframework.http.codec.json.KotlinSerializationJsonEncoder
public class KotlinSerializationJsonEncoder
extends KotlinSerializationStringEncoder<kotlinx.serialization.json.Json>
Encode from an
Object
stream to a byte stream of JSON objects using
kotlinx.serialization.
This encoder 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:
- Sebastien Deleuze, Iain Henderson
-
Constructor Summary
-
Method Summary
Methods inherited from class org.springframework.http.codec.KotlinSerializationStringEncoder
canEncode, encode, encodeValue, getEncodableMimeTypes, getEncodableMimeTypes
Methods inherited from class org.springframework.http.codec.KotlinSerializationSupport
canSerialize, format, serializer, supportedMimeTypes
-
Constructor Details
-
KotlinSerializationJsonEncoder
public KotlinSerializationJsonEncoder() -
KotlinSerializationJsonEncoder
public KotlinSerializationJsonEncoder(kotlinx.serialization.json.Json json)
-