SerializationConverter
ContentConverter with kotlinx.serialization.
Installation:
install(ContentNegotiation) {
json()
json(ContentType.Application.Json, Json.nonstrict)
cbor()
protoBuf()
}
Content copied to clipboard
Constructors
Link copied to clipboard
Creates a converter serializing with the specified binary format.
Link copied to clipboard
fun SerializationConverter(format: StringFormat, defaultCharset: Charset = Charsets.UTF_8)
Content copied to clipboard
Creates a converter serializing with the specified string format and defaultCharset (optional, usually it is UTF-8).
Link copied to clipboard
Link copied to clipboard
This is no longer supported. Instead, specify format explicitly or use the corresponding DSL function.
Functions
Link copied to clipboard
open suspend override fun convertForReceive(context: PipelineContext<ApplicationReceiveRequest, ApplicationCall>): Any?
Content copied to clipboard
Link copied to clipboard
open suspend override fun convertForSend(context: PipelineContext<Any, ApplicationCall>, contentType: ContentType, value: Any): Any?
Content copied to clipboard