

jq: sed for json - 6ren
http://stedolan.github.com/jq/tutorial/

======
viraptor
I 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
Exactly. See also similar ideas for yaml:

<https://github.com/peterkmurphy/YPath-Specification>

<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.

------
omaranto
Previous submissions:

<http://news.ycombinator.com/item?id=4562609>

<http://news.ycombinator.com/item?id=4679933>

------
lhnz
I 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.

~~~
hnriot
Wouldn't that be python?

~~~
lhnz
It would be some kind of meta-language that expressed these concepts of
shuffling data around in a more succinct, non-imperative form. But having said
that, I'm not really sure whether this could be done in Python.

------
niggler
awk for json would be really nice (where patterns and records match
substructures ...)

~~~
dc2447
jgrep?

------
meaty
this reminds me a bit of powershell's XML/object filtering except less
painful.

------
aioprisan
great work! btw, is there a versioned json toolkit?

