JSONPATH_NG(1)
β¨ jsonpath_ng(1) β¨
okay bestie, gather round, because this is the manual page for jsonpath_ng, a User Command, and honestly? she's iconic. let's get into it π
πΈ NAME πΈ
jsonpath_ng β search JSONPath into JSON files. that's the whole vibe. you point her at JSON, she goes digging. no cap.
π¦ DESCRIPTION π¦
the usage line, literally verbatim, don't @ me:
usage: jsonpath_ng [-h] expression [file ...]
so basically: she searches JSON files (or stdin, if you're feeling mysterious) according to a JSONPath expression. that's it. that's the gig. and she ate. π
π positional arguments π
these are the things you just... hand her. no dashes, no ceremony. just vibes.
expressionβ a JSONPath expression. this is the little spell you cast to tell her what to look for. main character energy fr fr.fileβ files to search. and if you give her none? she searches stdin instead. she's flexible like that. lowkey iconic. π«Ά
π options π
-h,--helpβ show this help message and exit. she will simply tell you everything she knows and then dip. queen behaviour.
π Quick JSONPath reference π
(see more at https://github.com/kennknowles/python-jsonpath-rw β go read it, iykyk)
atomics:
$β root object. the very top. the mother of all objects. π`this`β current object. like, this one, right here, the one we're standing in. π«
operators:
path1.path2β same as xpath/. nesting, but make it JSON. πͺpath1|path2β union. both of them. why choose? β¨path1..path2β somewhere in between. she'll find it. she always finds it. π
fields:
fieldnameβ field with name. the classic. the blueprint. π*β any field. wildcard behaviour, very unbothered, very slay. β[_start_?:_end_?]β array slice. and also[*]β any array index. slicing and dicing, no notes. π
ngl bestie, that's the whole page. short, sweet, and she does exactly what she says on the tin. no bugs to warn you about here, no deprecated anything, no exit statuses hiding in the shadows. just pure JSONPath joy. πβ¨
and that's a wrap on the jsonpath_ng manual, brought to you by jsonpath_ng 1.5.3 from way back in July 2023 β yes she's vintage, yes she still serves. mwah. π
ππ
π¦ where this page comes from
- debian trixie: python3-jsonpath-ng 1.7.0-1 Β· Apache-2.0
- ubuntu noble: python3-jsonpath-ng 1.6.1-1 Β· Apache-2.0
- ubuntu questing: python3-jsonpath-ng 1.7.0-1
- ubuntu resolute: python3-jsonpath-ng 1.7.0-4 Β· Apache-2.0
- ubuntu stonking: python3-jsonpath-ng 1.8.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms