toByteArray

open fun toByteArray(): Array<Byte>

Write the JSON to a UTF-8 encoded byte array.

Return

the JSON bytes


open fun toByteArray(charset: Charset): Array<Byte>

Write the JSON to a byte array.

Return

the JSON bytes

Parameters

charset

the charset