vertx / io.vertx.kotlin.core.streams / end

# end

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

End the stream with an object encoded to json.

### 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