Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new JsonParseError(cause: Error, path?: undefined | string, line?: undefined | number, errorPortion?: undefined | string): JsonParseError

Properties

Optional cause

cause: NamedErrorLike

Optional errorPortion

errorPortion: undefined | string

Optional line

line: undefined | number

message

message: string

name

name: string

Optional path

path: undefined | string

Optional stack

stack: undefined | string

Accessors

fullStack

fullStack:

Methods

Static create

  • create(error: SyntaxError, data: string, jsonPath?: undefined | string): JsonParseError
  • 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.

    • Optional jsonPath: undefined | string

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

    Returns JsonParseError