write

abstract fun write(
    data: Any,
    contentType: ContentType
): OutgoingContent
open fun write(data: Any): OutgoingContent

Convert data object to OutgoingContent.