Skip to main content

Class: RecursiveDescentSegment

jsonpath.selectors.RecursiveDescentSegment

Base class for all JSONPath segments and selectors.

Hierarchy

Constructors

constructor

new RecursiveDescentSegment(environment, token, selector): RecursiveDescentSegment

Parameters

NameType
environmentJSONPathEnvironment
tokenToken
selectorJSONPathSelector

Returns

RecursiveDescentSegment

Overrides

JSONPathSelector.constructor

Defined in

src/path/selectors.ts:360

Properties

environment

Readonly environment: JSONPathEnvironment

Inherited from

JSONPathSelector.environment

Defined in

src/path/selectors.ts:361


selector

Readonly selector: JSONPathSelector

Defined in

src/path/selectors.ts:363


token

Readonly token: Token

The token at the start of this selector.

Inherited from

JSONPathSelector.token

Defined in

src/path/selectors.ts:362

Methods

_lazyResolve

_lazyResolve(nodes): Generator<JSONPathNode, any, unknown>

Parameters

NameType
nodesIterable<JSONPathNode>

Returns

Generator<JSONPathNode, any, unknown>

Defined in

src/path/selectors.ts:394


lazyResolve

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

Parameters

NameTypeDescription
nodesIterable<JSONPathNode>Nodes matched by preceding selectors.

Returns

Generator<JSONPathNode, any, unknown>

Overrides

JSONPathSelector.lazyResolve

Defined in

src/path/selectors.ts:389


nondeterministicChildren

nondeterministicChildren(node): JSONPathNode[]

Parameters

NameType
nodeJSONPathNode

Returns

JSONPathNode[]

Defined in

src/path/selectors.ts:536


nondeterministicVisitor

nondeterministicVisitor(root, depth?): JSONPathNode[]

Parameters

NameTypeDefault value
rootJSONPathNodeundefined
depthnumber1

Returns

JSONPathNode[]

Defined in

src/path/selectors.ts:496


resolve

resolve(nodes): JSONPathNode[]

Parameters

NameTypeDescription
nodesJSONPathNode[]Nodes matched by preceding selectors.

Returns

JSONPathNode[]

Overrides

JSONPathSelector.resolve

Defined in

src/path/selectors.ts:368


toString

toString(): string

Return a canonical string representation of this selector.

Returns

string

Overrides

JSONPathSelector.toString

Defined in

src/path/selectors.ts:454


visitor

visitor(node, depth?): JSONPathNode[]

Parameters

NameTypeDefault value
nodeJSONPathNodeundefined
depthnumber1

Returns

JSONPathNode[]

Defined in

src/path/selectors.ts:458