JsonPathParser¶
Parser for JSONPath expressions.
Provides two entry points:
- parse() returns errors as data (consistent with JsonParser.parse())
- compile() raises on invalid input (convenience for known-valid paths)
Constructors¶
create¶
Returns¶
- JsonPathParser val^
Public Functions¶
parse¶
Parse a JSONPath expression. Returns a compiled query on success or a structured error on failure.
Parameters¶
- path: String val
Returns¶
- (JsonPath val | JsonPathParseError val)
compile¶
Parse a JSONPath expression, raising on invalid input.
Use this when the path string is known to be valid (e.g., a string
literal). For user-provided paths, prefer parse() which returns
errors as data.
Parameters¶
- path: String val
Returns¶
- JsonPath val ?
eq¶
Parameters¶
- that: JsonPathParser val
Returns¶
- Bool val
ne¶
Parameters¶
- that: JsonPathParser val
Returns¶
- Bool val