Package-level declarations

Types

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

Creates a converter serializing with the specified string format

Link copied to clipboard

An extension for KotlinxSerializationConverter that can add format-specific logic

Link copied to clipboard

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)

Link copied to clipboard
@InternalSerializationApi
@ExperimentalSerializationApi
fun SerializersModule.serializerForTypeInfo(typeInfo: TypeInfo): KSerializer<*>

Attempts to create a serializer for the given typeInfo