vertx / io.vertx.kotlin.core.buffer / io.vertx.core.buffer.Buffer / appendJson

appendJson

inline fun Buffer.appendJson(pretty: Boolean = false, block: Json.() -> Any): Buffer

Appends the specified json {@code block} to the end of this Buffer. The buffer will expand as necessary to accommodate any bytes written.

Parameters

pretty - wether or not to pretty format the json output

block - the json producing block to write

Receiver
a Vert.x Buffer

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