public class KotlinSerializationJsonEncoder extends org.springframework.core.codec.AbstractEncoder<Object>
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.
| Constructor and Description |
|---|
KotlinSerializationJsonEncoder() |
KotlinSerializationJsonEncoder(kotlinx.serialization.json.Json json) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canEncode(org.springframework.core.ResolvableType elementType,
org.springframework.util.MimeType mimeType) |
reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer> |
encode(org.reactivestreams.Publisher<?> inputStream,
org.springframework.core.io.buffer.DataBufferFactory bufferFactory,
org.springframework.core.ResolvableType elementType,
org.springframework.util.MimeType mimeType,
Map<String,Object> hints) |
org.springframework.core.io.buffer.DataBuffer |
encodeValue(Object value,
org.springframework.core.io.buffer.DataBufferFactory bufferFactory,
org.springframework.core.ResolvableType valueType,
org.springframework.util.MimeType mimeType,
Map<String,Object> hints) |
getEncodableMimeTypes, getLogger, setLoggerpublic KotlinSerializationJsonEncoder()
public KotlinSerializationJsonEncoder(kotlinx.serialization.json.Json json)
public boolean canEncode(org.springframework.core.ResolvableType elementType,
@Nullable
org.springframework.util.MimeType mimeType)
public reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer> encode(org.reactivestreams.Publisher<?> inputStream,
org.springframework.core.io.buffer.DataBufferFactory bufferFactory,
org.springframework.core.ResolvableType elementType,
@Nullable
org.springframework.util.MimeType mimeType,
@Nullable
Map<String,Object> hints)