toByteArray

abstract fun toByteArray(): ByteArray

Consume the serializer and get the payload as a ByteArray