Package com.rnett.krosstalk.serialization.plugin

APIs necessary to define serialization plugins. Look at the Kotlinx serialization plugin for examples.

For instructions on writing plugins, see WRITING_PLUGINS.md.

Types

Link copied to clipboard
abstract class ArgumentSerializationHandler<S>(transformer: SerializedFormatTransformer<S>) : BaseSerializationHandler<S>

A SerializationHandler that automatically serializes/deserializes each argument before calling serializeArguments/deserializeArguments.

Link copied to clipboard
class ArgumentSerializers<S>(map: Map<String, Serializer<*, S>>)

A {Argument -> Serializer} map, with helper functions to get the needed serializer as Serializer<Any?, S> rather than Serializer<*, S> and to serialize/deserialize all arguments.

Link copied to clipboard
abstract class BaseSerializationHandler<S>(transformer: SerializedFormatTransformer<S>) : SerializationHandler<S>
Link copied to clipboard
typealias BinarySerializer<T> = Serializer<T, ByteArray>

A serializer that directly serializes/deserializes to/from ByteArray.

Link copied to clipboard
Link copied to clipboard
interface SerializationHandler<S>

A SerializationHandler capable of getting serializers from KTypes, serializing and deserializing argument maps to some intermediate data type S, and turning Ss into ByteArrays and Strings and visa versa.

Link copied to clipboard
interface SerializedFormatTransformer<S>
Link copied to clipboard
interface Serializer<T, S>

A serializer/deserializer that transforms T to and from S and visa versa, and transforms S to and from ByteArray.

Link copied to clipboard
typealias StringSerializer<T> = Serializer<T, String>

A serializer that serializes/deserializes to/from String.

Link copied to clipboard

Properties

Link copied to clipboard
const val byteArrayContentType: String
Link copied to clipboard
const val stringContentType: String