Class SerializationKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final MsgPack getMsgPack() A lazily initialized MsgPack instance with a custom configuration.
      final KSerializer<Map<String, Object>> getEnvSerializer() MessagePack Serializer for Map<String, Any>
      final KSerializer<Map<String, Object>> getNullableKVSerializer() MessagePack Serializer for Map<String, Any?>?
      final static <T extends Any> ByteArray msgPackEncode(T value) Encodes a given object into a msgpack byte array using the reified type's serializer.
      final static <T extends Any> ByteArray msgPackEncode(SerializationStrategy<T> serializer, T value) Encodes a given object into a msgpack byte array using the provided serializer.
      final static <T extends Any> Result<T> msgPackDecode(ByteArray bytes) Decodes a given msgpack byte array into an object using the reified type's deserializer.
      final static <T extends Any> Result<T> msgPackDecode(DeserializationStrategy<T> serializer, ByteArray bytes) Decodes a given msgpack byte array into an object using the provided deserializer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getMsgPack

         final MsgPack getMsgPack()

        A lazily initialized MsgPack instance with a custom configuration.

      • msgPackEncode

         final static <T extends Any> ByteArray msgPackEncode(T value)

        Encodes a given object into a msgpack byte array using the reified type's serializer.

        Parameters:
        value - the object to encode
      • msgPackEncode

         final static <T extends Any> ByteArray msgPackEncode(SerializationStrategy<T> serializer, T value)

        Encodes a given object into a msgpack byte array using the provided serializer.

        Parameters:
        serializer - the serializer to use for encoding the object
        value - the object to encode
      • msgPackDecode

         final static <T extends Any> Result<T> msgPackDecode(ByteArray bytes)

        Decodes a given msgpack byte array into an object using the reified type's deserializer.

        Parameters:
        bytes - the msgpack byte array to decode
      • msgPackDecode

         final static <T extends Any> Result<T> msgPackDecode(DeserializationStrategy<T> serializer, ByteArray bytes)

        Decodes a given msgpack byte array into an object using the provided deserializer.

        Parameters:
        serializer - the deserializer to use for decoding the object
        bytes - the msgpack byte array to decode