api / tv.twelvetone.rjson / PrettyPrinter / Options

Options

class Options

Constructors

<init>

Options()

Properties

arrayItemNewline

var arrayItemNewline: Boolean

Put array items on new lines.

escapeUnicode

var escapeUnicode: Boolean

Replaces Unicode characters > 0x07FF with \uXXXX in object names and values

indentLevel

var indentLevel: Int

The number of spaces to intent for each level.

isSpaceAfterColon

var isSpaceAfterColon: Boolean

Put a space after object pair colons.

isSpaceAfterComma

var isSpaceAfterComma: Boolean

Put a space after commas when object pairs or array items are on the same line.

objectItemNewline

var objectItemNewline: Boolean

Put object pairs on new lines.

quoteFallback

var quoteFallback: String

The type of quote to use when quotes are required or requested. Valid values are "single", "double", and "backtick"

target

var target: String

The target format. One of 'json', 'rjson', or 'js'. This is used to determine what object property names need to be quoted.

useArrayCommas

var useArrayCommas: Boolean

Always use commas between array items.

useObjectCommas

var useObjectCommas: Boolean

Always use commas between object pairs.

usePropertyNameQuotes

var usePropertyNameQuotes: Boolean

Always use quotes for object property names. The type of quote will use the option value of quote fallback. If the string value contains a quote, the opposite type will be used.

useQuotes

var useQuotes: Boolean

Always use quotes. The type of quote will use the option value of quote fallback. If the string value contains a quote, the opposite type will be used.

Companion Object Properties

JsCompact

val JsCompact: Options

Jso format with no newlines.

JsPretty

val JsPretty: Options

Jso format with newlines for arrays and object pairs.

JsonCompact

val JsonCompact: Options

Json format with no newlines.

JsonPretty

val JsonPretty: Options

Json format with newlines for arrays and object pairs.

RJsonCompact

val RJsonCompact: Options

RJson format with no newlines.

RJsonPretty

val RJsonPretty: Options

RJson format with newlines for arrays and object pairs.