json

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

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

Parameters

json

format instance (optional)

contentType

to register with, application/json by default