json

external val json: JsonFunction<*>(source)

This is a shortcut for creating application/json responses. Converts data to JSON and sets the Content-Type header.