Python JSONPath2 Parser Module

The jsonpath parser module.

exception jsonpath2.parser.CallableSubscriptNotFoundError(name)[source]

Callable subscript not found error.

__init__(name)[source]

Initialize callable subscript not found error.

class jsonpath2.parser._ConsoleErrorListener[source]
syntaxError(recognizer, offendingSymbol, line, column, msg, e)[source]
class jsonpath2.parser._JSONPathListener(_stack=None)[source]
__init__(_stack=None)[source]

Initialize self. See help(type(self)) for accurate signature.

exitAndExpression(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.AndExpressionContext)[source]
exitArray(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.ArrayContext)[source]
exitJsonpath(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.JsonpathContext)[source]
exitJsonpath_(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.JsonpathContext)[source]
exitJsonpath__(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.JsonpathContext)[source]
exitNotExpression(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.NotExpressionContext)[source]
exitObj(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.ObjContext)[source]
exitOrExpression(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.OrExpressionContext)[source]
exitSliceable(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.SliceableContext)[source]
exitSubscript(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.SubscriptContext)[source]
exitSubscriptable(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.SubscriptableContext)[source]
exitSubscriptableArguments(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.SubscriptableArgumentsContext)[source]
exitSubscriptableBareword(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.SubscriptableBarewordContext)[source]
exitSubscriptables(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.SubscriptablesContext)[source]
exitValue(ctx: jsonpath2.parser.JSONPathParser.JSONPathParser.ValueContext)[source]
class jsonpath2.parser._JSONPathParser(input: antlr4.BufferedTokenStream.TokenStream, output: TextIO = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]
tryCast(cls)[source]

Override the antlr tryCast method.

jsonpath2.parser._createCallableSubscript(name, *args, **kwargs)[source]

Create callable subscript for name, arguments and keyword arguments.

jsonpath2.parser._parse_input_stream(input_stream: antlr4.InputStream.InputStream) → jsonpath2.nodes.root.RootNode[source]
jsonpath2.parser.parse_file(*args, **kwargs) → jsonpath2.nodes.root.RootNode[source]

Parse a json path from a file.

jsonpath2.parser.parse_str(*args, **kwargs) → jsonpath2.nodes.root.RootNode[source]

Parse a json path from a string.