Skip to content

JsonPathParser

[Source]

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)

primitive val JsonPathParser

Constructors

create

[Source]

new val create()
: JsonPathParser val^

Returns


Public Functions

parse

[Source]

Parse a JSONPath expression. Returns a compiled query on success or a structured error on failure.

fun box parse(
  path: String val)
: (JsonPath val | JsonPathParseError val)

Parameters

Returns


compile

[Source]

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.

fun box compile(
  path: String val)
: JsonPath val ?

Parameters

Returns


eq

[Source]

fun box eq(
  that: JsonPathParser val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: JsonPathParser val)
: Bool val

Parameters

Returns