json

inline fun <T : Any, R : HttpMessage> R.json(t: T): R

Convenience function to write the object as JSON to the message body and set the content type.


inline fun <T : Any> HttpMessage.json(): T

Convenience function to read an object as JSON from the message body.


val json: Json