fun Configuration.json(json: Json = Json.Default, module: SerializersModule = EmptySerializersModule, contentType: ContentType = ContentType.Application.Json): Unit
Register application/json
(or another specified contentType) content type
to ContentNegotiation feature using kotlinx.serialization.
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 Configuration.json(json: Json = DefaultJson, contentType: ContentType = ContentType.Application.Json): Unit
Register application/json
(or another specified contentType) content type
to ContentNegotiation feature using kotlinx.serialization.