JsonError

Unpublished development API. This package is under development and is not available as a published release.

JSON parse diagnostic with a syntax category and source index, line, and column.

import type { JsonError } from '@threadplane/content/json';

Declaration

export interface JsonError  {
  readonly code: 'INVALID_SYNTAX' | 'UNEXPECTED_END' | 'TRAILING_CONTENT';
  readonly column: number;
  readonly index: number;
  readonly line: number;
  readonly message: string;
}

Members

code

readonly code: 'INVALID_SYNTAX' | 'UNEXPECTED_END' | 'TRAILING_CONTENT';

column

readonly column: number;

index

readonly index: number;

line

readonly line: number;

message

readonly message: string;