3 ms·
jq: sed for json
- aioprisan 14y agogreat work! btw, is there a versioned json toolkit?
- lhnz 14y agoI would like something like this but for querying Python objects (dict containing lists of dicts with particular key-values that are needed, etc.) sort of like a declarative way of cleanly creating a new data structure from a response, or even yielding elements that match the definition I give. Does anything like this exist already? I am constantly writing different code to do this.
- meaty 14y agothis reminds me a bit of powershell's XML/object filtering except less painful.
- omaranto 14y agoPrevious submissions: http://news.ycombinator.com/item?id=4562609 http://news.ycombinator.com/item?id=4562609 http://news.ycombinator.com/item?id=4679933 http://news.ycombinator.com/item?id=4679933
- niggler 14y agoawk for json would be really nice (where patterns and records match substructures ...)
- dc2447 14y agojgrep?
- viraptor 14y agoI like those tools - working with json files often calls for some simple processing and it's a bit silly to write an app for each case. But I wish they would start embracing some common standard. So far we've got: * jsonselect * jsonpath * jsonquery * jaql * unql (query part) which all need the same query dsl, but use a slightly different syntax. I'd really like to see them unified one day, like xpath is the default for xml.
- zdw 14y agoExactly. See also similar ideas for yaml: https://github.com/peterkmurphy/YPath-Specification https://github.com/peterkmurphy/YPath-Specification https://github.com/briandfoy/ypath https://github.com/briandfoy/ypath Traversing and extracting data from a hierarchical structure is a basic task that shouldn't need to be reinvented every time.