parsing/json_path_utils library
Read a value from decoded JSON by a simple dotted/indexed path. Roadmap #157.
Supports the common subset used for config and API plucking:
$.a.b, a.b[0], [0].name, a.b[2].c. A leading $ is optional. It is
deliberately NOT full JSONPath — no wildcards, recursive descent (..),
filters, or slices — because that complexity is rarely needed and would
pull in a parser. For anything missing along the path, it returns null
rather than throwing, so callers can use ?? for defaults.
Functions
-
getByJsonPath(
Object? json, String path) → Object? -
Returns the value at
pathwithin decoded JSONjson(maps/lists/scalars as produced byjsonDecode), ornullif any segment is missing or the path is malformed.