Class KotlinSerializationProtobufEncoder
java.lang.Object
org.springframework.http.codec.KotlinSerializationSupport<T>
org.springframework.http.codec.KotlinSerializationBinaryEncoder<kotlinx.serialization.protobuf.ProtoBuf>
org.springframework.http.codec.protobuf.KotlinSerializationProtobufEncoder
public class KotlinSerializationProtobufEncoder
extends KotlinSerializationBinaryEncoder<kotlinx.serialization.protobuf.ProtoBuf>
Decode a byte stream into a Protocol Buffer and convert to Objects with
kotlinx.serialization.
This decoder can be used to bind @Serializable
Kotlin classes,
open polymorphic serialization
is not supported.
It supports application/x-protobuf
, application/octet-stream
, and application/vnd.google.protobuf
.
Decoding streams is not supported yet, see kotlinx.serialization/issues/1073 related issue.
- Since:
- 6.0
- Author:
- Iain Henderson
-
Constructor Summary
ConstructorDescriptionKotlinSerializationProtobufEncoder
(kotlinx.serialization.protobuf.ProtoBuf protobuf) -
Method Summary
Methods inherited from class org.springframework.http.codec.KotlinSerializationBinaryEncoder
canEncode, encode, encodeValue, getEncodableMimeTypes, getEncodableMimeTypes
Methods inherited from class org.springframework.http.codec.KotlinSerializationSupport
canSerialize, format, serializer, supportedMimeTypes
-
Constructor Details
-
KotlinSerializationProtobufEncoder
public KotlinSerializationProtobufEncoder() -
KotlinSerializationProtobufEncoder
public KotlinSerializationProtobufEncoder(kotlinx.serialization.protobuf.ProtoBuf protobuf)
-