commonMain.com.caesarealabs.rpc4k.runtime.api.SerializationFormat.kt Maven / Gradle / Ivy
package com.caesarealabs.rpc4k.runtime.api
import com.caesarealabs.rpc4k.runtime.implementation.serializers.*
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.SerializationStrategy
import kotlinx.serialization.json.Json
/**
* For example [Json] or Protobuf
* Must use the [Rpc4kSerializersModule]
*/
public interface SerializationFormat {
public fun encode(serializer: SerializationStrategy, value: T): ByteArray
public fun decode(serializer: DeserializationStrategy, raw: ByteArray): T
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy