tags:

views:

55

answers:

3

Can anyone recommend a Unix (choose your flavor) JSON parser that could be used to introspect values from a JSON response in a pipeline?

+1  A: 

You could try jsawk as suggested in this answer.

Really you could whip up a quick python script to do this though.

SB
Interesting, will check out.
Xepoch
+2  A: 

First, install the JSON module from CPAN:

cpan JSON

Then you can use this command-line parser (which you could put into a bash alias if you like):

perl -MData::Dumper -MJSON=from_json -ne'print Dumper(from_json($_))'
Ether
A: 

There is also json-comamnd if you happen to have node.js and npm in your stack.