Package io.ktor.serialization.kotlinx

Types

Link copied to clipboard
class KotlinxSerializationConverter(format: SerialFormat) : ContentConverter

Creates a converter serializing with the specified string format and defaultCharset (optional, usually it is UTF-8).

Link copied to clipboard
class KotlinxWebsocketSerializationConverter(format: SerialFormat) : WebsocketContentConverter

Creates a converter for WebSocket serializing with the specified string format and defaultCharset (optional, usually it is UTF-8).

Functions

Link copied to clipboard
fun Configuration.serialization(contentType: ContentType, format: BinaryFormat)

Register kotlinx.serialization converter into ContentNegotiation plugin with the specified contentType and binary format (such as CBOR, ProtoBuf)

fun Configuration.serialization(contentType: ContentType, format: StringFormat)

Register kotlinx.serialization converter into ContentNegotiation plugin with the specified contentType and string format (such as Json)