Skip to main content

Class: abstract JSONPathSegment

Base class for all JSONPath segments. Both shorthand and bracketed.

Constructors

new JSONPathSegment()

new JSONPathSegment(environment, token, selectors): JSONPathSegment

Parameters

environment

JSONPathEnvironment

token

Token

selectors

JSONPathSelector[]

Returns

JSONPathSegment

Defined in

src/path/segments.ts:10

Properties

environment

readonly environment: JSONPathEnvironment

Defined in

src/path/segments.ts:11


selectors

readonly selectors: JSONPathSelector[]

Defined in

src/path/segments.ts:13


token

readonly token: Token

Defined in

src/path/segments.ts:12

Methods

lazyResolve()

abstract lazyResolve(nodes): Generator<JSONPathNode, any, any>

Parameters

nodes

Iterable<JSONPathNode, any, any>

Nodes matched by preceding segments.

Returns

Generator<JSONPathNode, any, any>

Defined in

src/path/segments.ts:24


resolve()

abstract resolve(nodes): JSONPathNode[]

Parameters

nodes

JSONPathNode[]

Nodes matched by preceding segments.

Returns

JSONPathNode[]

Defined in

src/path/segments.ts:19


toString()

abstract toString(): string

Return a canonical string representation of this segment.

Returns

string

Defined in

src/path/segments.ts:31