Hierarchy

  • ColorJSON

Constructors

Properties

BooleanColor: ChatColor
ClassColor: ChatColor
ClassStyle: ChatColor
CloseArray: string
CloseObject: string
Comma: string
CycleColor: ChatColor
CycleValue: string
EscapeColor: ChatColor
FalseValue: string
FunctionColor: ChatColor
FunctionValue: string
IncludeClassNames: boolean
Indent: string
InlineThreshold: number
KeyColor: ChatColor
KeyDelimiter: string
KeyValueSeparator: string
MaxDepth: number
NewLine: string
NullColor: ChatColor
NullValue: string
NumberColor: ChatColor
OpenArray: string
OpenCloseArrayColor: ChatColor
OpenCloseObjectColor: ChatColor
OpenObject: string
Space: string
StringColor: ChatColor
StringDelimiter: string
TrueValue: string
TruncatedObjectValue: string
UndefinedValue: string
clearCycle: any
isCycle: any
markCycle: any
DEFAULT: ColorJSON

Methods

  • Escapes a string for JSON.

    Parameters

    • str: string

      The string to escape.

    Returns string

  • Parameters

    • value: object
    • className: string
    • Optional indentLevel: number

    Returns boolean

  • Transforms a value into a chat-friendly, colored JSON representation.

    Parameters

    • value: unknown

      The value to transform.

    Returns string

  • Transforms an array into a JSON representation.

    Parameters

    • value: unknown[]

      The array to transform.

    • Optional indentLevel: number

      The indentation level for pretty-printing.

    Returns string

  • Transforms a boolean into a JSON representation.

    Parameters

    • value: boolean

      The boolean to transform.

    Returns string

  • Returns a cycle JSON representation.

    Returns string

  • Transforms a function into a JSON representation.

    Parameters

    • value: Function

      The function to transform.

    Returns string

  • Returns a null JSON representation.

    Returns string

  • Transforms a number into a JSON representation.

    Parameters

    • value: number

      The number to transform.

    Returns string

  • Transforms an object into a JSON representation.

    Parameters

    • value: object

      The object to transform.

    • className: string

      Class Name of the object.

    • entries: any[][]

      Entries of the object to transform.

    • Optional indentLevel: number

      The indentation level for pretty-printing.

    Returns string

  • Transforms a string into a JSON representation.

    Parameters

    • value: string

      The string to transform.

    Returns string

  • Transforms an object into a truncated JSON representation.

    Parameters

    • value: object

      The object to transform.

    • className: string

      Class Name of the object.

    • Optional indentLevel: number

      The indentation level for pretty-printing.

    Returns string

  • Returns an undefined JSON representation.

    Returns string

  • Transforms a value of any type into a JSON representation. This function is not meant to be overridden.

    Parameters

    • value: unknown

      The value to transform.

    • Optional indentLevel: number

      The indentation level for pretty-printing.

    Returns string