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
All Implemented Interfaces:
Encoder<Object>

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 Details

    • KotlinSerializationProtobufEncoder

      public KotlinSerializationProtobufEncoder()
    • KotlinSerializationProtobufEncoder

      public KotlinSerializationProtobufEncoder(kotlinx.serialization.protobuf.ProtoBuf protobuf)