json

fun ContentNegotiation.Configuration.json(json: Json = Json.Default, module: SerializersModule = EmptySerializersModule, contentType: ContentType = ContentType.Application.Json)

Register application/json (or another specified contentType) content type to ContentNegotiation feature using kotlinx.serialization.

Parameters

json

configuration with settings such as quoting, pretty print and so on (optional)

module

is used for serialization (optional)

contentType

to register with, application/json by default


fun ContentNegotiation.Configuration.json(json: Json = DefaultJson, contentType: ContentType = ContentType.Application.Json)

Register application/json (or another specified contentType) content type to ContentNegotiation feature using kotlinx.serialization.

Parameters

json

format instance (optional)

contentType

to register with, application/json by default