Python JSONPath2 Nodes Module

Nodes module contains all the node definitions.

The current node module.

class jsonpath2.nodes.current.CurrentNode(next_node: jsonpath2.node.Node)[source]

Current node class to store current node info.

__init__(next_node: jsonpath2.node.Node)[source]

Save the current node.

_abc_impl = <_abc_data object>
match(root_value: object, current_value: object) → Generator[jsonpath2.node.MatchData, None, None][source]

Match the current value and root value.

Recursive descent module.

class jsonpath2.nodes.recursivedescent.RecursiveDescentNode(next_node: jsonpath2.node.Node)[source]

Recursive descent node class.

__init__(next_node: jsonpath2.node.Node)[source]

Save the next node.

_abc_impl = <_abc_data object>
match(root_value: object, current_value: object) → Generator[jsonpath2.node.MatchData, None, None][source]

Match the root value with the current value.

Root node type.

class jsonpath2.nodes.root.RootNode(next_node: jsonpath2.node.Node)[source]

Root node to start the process.

__init__(next_node: jsonpath2.node.Node)[source]

Save the next node object.

_abc_impl = <_abc_data object>
match(root_value: object, current_value: object) → Generator[jsonpath2.node.MatchData, None, None][source]

Match the root value with the current value.

The subscript module.

class jsonpath2.nodes.subscript.SubscriptNode(next_node: jsonpath2.node.Node, subscripts: List[jsonpath2.subscript.Subscript] = None)[source]

The subscript node class to handle ‘[]’.

__init__(next_node: jsonpath2.node.Node, subscripts: List[jsonpath2.subscript.Subscript] = None)[source]

Save the next node and subscripts.

_abc_impl = <_abc_data object>
match(root_value: object, current_value: object) → Generator[jsonpath2.node.MatchData, None, None][source]

Match root value and current value for subscripts.

Terminal node object.

class jsonpath2.nodes.terminal.TerminalNode[source]

Terminal node class.

_abc_impl = <_abc_data object>
match(root_value: object, current_value: object) → Generator[jsonpath2.node.MatchData, None, None][source]

Match a termainal node.