json
Content copied to clipboard
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)
Content copied to clipboard
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