api / tv.twelvetone.json / JsonValue / writeTo

writeTo

fun writeTo(writer: Writer?, config: WriterConfig? = WriterConfig.MINIMAL): Unit

Writes the JSON representation of this value to the given writer using the given formatting.

Writing performance can be improved by using a BufferedWriter.

Parameters

writer - the writer to write this value to config - a configuration that controls the formatting or null for the minimal form

Exceptions

IOException - if an I/O error occurs in the writer