Skip to main content

Type Alias: JSONPathEnvironmentOptions

JSONPathEnvironmentOptions: object

JSONPath environment options. The defaults are in compliance with JSONPath standards.

Type declaration

keysPattern?

optional keysPattern: RegExp

The pattern to use for the non-standard keys selector.

The lexer expects the sticky bit to be set. Defaults to /~/y.

maxIntIndex?

optional maxIntIndex: number

The maximum number allowed when indexing or slicing an array. Defaults to 2**53 -1.

maxRecursionDepth?

optional maxRecursionDepth: number

The maximum number of objects and/or arrays the recursive descent selector can visit before a JSONPathRecursionLimitError is thrown.

minIntIndex?

optional minIntIndex: number

The minimum number allowed when indexing or slicing an array. Defaults to -(2**53) -1.

nondeterministic?

optional nondeterministic: boolean

If true, enable nondeterministic ordering when iterating JSON object data.

This is mainly useful for validating the JSONPath Compliance Test Suite.

strict?

optional strict: boolean

Indicates if the environment should to be strict about its compliance with RFC 9535.

Defaults to true. Setting strict to false enables non-standard features. Non-standard features are subject to change if conflicting features are included in a future JSONPath standard or draft standard, or an overwhelming consensus amongst the JSONPath community emerges that differs from this implementation.

Defined in

src/path/environment.ts:27