Class JsonParseError

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

Properties

cause?: NamedErrorLike
errorPortion?: string
line?: number
name: string
path?: string

Accessors

  • get fullStack(): undefined | string
  • Returns undefined | string

Methods

  • Creates a JsonParseError from a SyntaxError thrown during JSON parsing.

    Parameters

    • error: SyntaxError

      The SyntaxError to convert to a JsonParseError.

    • data: string

      The data input that caused the error.

    • OptionaljsonPath: string

      The path from which the data was read, if known.

    Returns JsonParseError