bytes

open fun bytes(value: T): ByteArray?(source)

Encodes value into a ByteArray.

Return

encoded bytes or null when the body intentionally carries no content.

Parameters

value

instance to be encoded.

See also

Throws

when the codec refuses to encode value.