4 ms·
Another great alternative is JSONPath[1] which unfortunately not as widely supported and known despite being brilliant! It's inspired by XPath so it's very fam
by wraptile 3y ago
Another great alternative is JSONPath[1] which unfortunately not as widely supported and known despite being brilliant!
It's inspired by XPath so it's very familiar instead of a complete new DSL. The killer feature imo is the recursive key lookup so you can write `people..address` and it'll find all "address" keys that descend from "people" anywhere in the JSON. It's by far my favorite parsing language for JSON and I wrote an introduction blog on how to use it in JSON dataset parsing [2] :)
1 - https://github.com/JSONPath-Plus/JSONPath https://github.com/JSONPath-Plus/JSONPath
2 - https://scrapfly.io/blog/parse-json-jsonpath-python/ https://scrapfly.io/blog/parse-json-jsonpath-python/
- cryptonector 3y agoFYI jq also has recursive traversal.