Class: RecursiveDescentSegment
jsonpath.selectors.RecursiveDescentSegment
Base class for all JSONPath segments and selectors.
Hierarchy
-
↳
RecursiveDescentSegment
Constructors
constructor
• new RecursiveDescentSegment(environment
, token
, selector
): RecursiveDescentSegment
Parameters
Name | Type |
---|---|
environment | JSONPathEnvironment |
token | Token |
selector | JSONPathSelector |
Returns
Overrides
Defined in
Properties
environment
• Readonly
environment: JSONPathEnvironment
Inherited from
Defined in
selector
• Readonly
selector: JSONPathSelector
Defined in
token
• Readonly
token: Token
The token at the start of this selector.
Inherited from
Defined in
Methods
_lazyResolve
▸ _lazyResolve(nodes
): Generator
<JSONPathNode
, any
, unknown
>
Parameters
Name | Type |
---|---|
nodes | Iterable <JSONPathNode > |
Returns
Generator
<JSONPathNode
, any
, unknown
>
Defined in
lazyResolve
▸ lazyResolve(nodes
): Generator
<JSONPathNode
, any
, unknown
>
Parameters
Name | Type | Description |
---|---|---|
nodes | Iterable <JSONPathNode > | Nodes matched by preceding selectors. |
Returns
Generator
<JSONPathNode
, any
, unknown
>
Overrides
Defined in
nondeterministicChildren
▸ nondeterministicChildren(node
): JSONPathNode
[]
Parameters
Name | Type |
---|---|
node | JSONPathNode |
Returns
Defined in
nondeterministicVisitor
▸ nondeterministicVisitor(root
, depth?
): JSONPathNode
[]
Parameters
Name | Type | Default value |
---|---|---|
root | JSONPathNode | undefined |
depth | number | 1 |
Returns
Defined in
resolve
▸ resolve(nodes
): JSONPathNode
[]
Parameters
Name | Type | Description |
---|---|---|
nodes | JSONPathNode [] | Nodes matched by preceding selectors. |
Returns
Overrides
Defined in
toString
▸ toString(): string
Return a canonical string representation of this selector.
Returns
string
Overrides
Defined in
visitor
▸ visitor(node
, depth?
): JSONPathNode
[]
Parameters
Name | Type | Default value |
---|---|---|
node | JSONPathNode | undefined |
depth | number | 1 |