json

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

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


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

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