# JsonError

`import { JsonError } from "destack:json";`

JSON parse, stringify, encode, or decode error.

```ds title="JsonError"
export struct JsonError {
    kind: JsonErrorKind;
    message: string;
    offset: usize;
    path: readonly JsonPathSegment[];
}
```

[language/library/src/json/error.ds:24:36](https://github.com/destack-sh/destack/blob/main/language/library/src/json/error.ds#L24-L36)

## Members

### `kind: JsonErrorKind`

The error category.

### `message: string`

The error message.

### `offset: usize`

The byte offset when known.

### `path: readonly JsonPathSegment[]`

The decoded value path when known.
