vertx / io.vertx.kotlin.core.streams / write

# write

`inline fun <S : WriteStream<Buffer>> S.write(pretty: Boolean = false, block: Json.() -> Any): S`

Encode an object to json and write it to the write stream.

### Parameters

`pretty` - wether or not to pretty format the json output

`block` - the json producing block to use

Receiver
a Vert.x WriteStream of Buffer

Return
a reference to this, so the API can be used fluently