WritableJson

JSON content that can be written out.

Author

Phillip Webb

Moritz Halbritter

Since

3.4.0

See also

Functions

Link copied to clipboard
open fun of(writableJson: WritableJson): WritableJson
Factory method used to create a WritableJson with a sensible toString that delegate to toJsonString.
Link copied to clipboard
abstract fun to(out: Appendable)
Write the JSON to the provided Appendable.
Link copied to clipboard
open fun toByteArray(): Array<Byte>
Write the JSON to a UTF-8 encoded byte array.
open fun toByteArray(charset: Charset): Array<Byte>
Write the JSON to a byte array.
Link copied to clipboard
open fun toJsonString(): String
Write the JSON to a String.
Link copied to clipboard
Write the JSON to the provided OutputStream using UTF8 encoding.
open fun toOutputStream(out: OutputStream, charset: Charset)
Write the JSON to the provided OutputStream using the given Charset.
Link copied to clipboard
Write the JSON to the provided WritableResource using UTF8 encoding.
open fun toResource(out: WritableResource, charset: Charset)
Write the JSON to the provided WritableResource using the given Charset.
Link copied to clipboard
open fun toWriter(out: Writer)
Write the JSON to the provided Writer.