Skip to main content

Module json_path

Module json_path 

Source
Expand description

Minimal dotted/indexed path language for JSONL field extraction.

Grammar:

path    := segment+
segment := ('.' ident) | ('[' digits ']')
ident   := [A-Za-z_][A-Za-z0-9_]*

The grammar is deliberately small — no wildcards, no filters, no quoted keys. It is just enough to address a field inside a typical JSONL record (e.g. .msg, .steps[0].text). Anything more expressive than this is out of scope for the v1 --json flag.

Enums§

Segment

Functions§

extract
Walk a JSON Value along the given path. Returns None if any segment misses (wrong type, missing key, out-of-bounds index).
parse_path
Parse a dotted/indexed path expression into a list of segments.