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.
writer
- the writer to write this value to
config
- a configuration that controls the formatting or null
for the minimal form
IOException
- if an I/O error occurs in the writer