Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • JsonOptions

Index

Properties

Optional bigint

bigint: boolean

If true, bigint values are converted to a number. Otherwise, they are ignored. This option is ignored by default as Logform stringifies BigInt in the default replacer.

default

true

Optional circularValue

circularValue: null | string | ErrorConstructor | TypeErrorConstructor

Defines the value for circular references. Set to undefined, circular properties are not serialized (array entries are replaced with null). Set to Error, to throw on circular references.

default

"[Circular]"

Optional deterministic

deterministic: boolean

If true, guarantee a deterministic key order instead of relying on the insertion order.

default

true

Optional maximumBreadth

maximumBreadth: number

Maximum number of entries to serialize per object (at least one). The serialized output contains information about how many entries have not been serialized. Ignored properties are counted as well (e.g., properties with symbol values). Using the array replacer overrules this option.

default

Infinity

Optional maximumDepth

maximumDepth: number

Maximum number of object nesting levels (at least 1) that will be serialized. Objects at the maximum level are serialized as "[Object]" and arrays as "[Array]".

default

Infinity

Optional space

space: number

The number of white space used to format the json.

Methods

Optional replacer

  • replacer(key: string, value: any): any
  • A function that influences how the info is stringified.

    Parameters

    • key: string
    • value: any

    Returns any