write

abstract fun write(instance: T, out: Appendable)

Write the given instance to the provided Appendable.

Parameters

instance

the instance to write (may be null

out

the output that should receive the JSON

Throws

on IO error


open fun write(instance: T): WritableJson

Provide a WritableJson implementation that may be used to write the given instance to various outputs.

Return

a WritableJson instance that may be used to write the JSON

Parameters

instance

the instance to write (may be null)