
JSON.sh: a JSON parser written in bash - wyclif
https://github.com/dominictarr/JSON.sh
======
gourneau
I have been using jsonpipe lots, it is deeply useful. I use it to use RESTful
services as if they were system processes. Also try to use it with something
like resty (<https://github.com/micha/resty>) to really make your life easier.

~~~
a3_nm
For more elaborate stuff, you can also use jshon (<http://kmkeen.com/jshon/>).

------
pjo
You can also use the python json.tool

    
    
        $ echo '{"json":"obj"}' | python -mjson.tool
        {
            "json": "obj"
        }
    

<http://docs.python.org/library/json.html>

------
simondlr
Awesome. Been working with a lot of APIs, and I also looked for a way to print
it out better in terminal. I found an alternative. If you have python, you can
pipe it to -mjson.tool and it will pretty print it in the terminal.

[http://stackoverflow.com/questions/352098/how-to-pretty-
prin...](http://stackoverflow.com/questions/352098/how-to-pretty-print-json-
script)

------
gord
like the idea.. and Id really like to see a fully javascript unix shell.

Using mongo, node.js for real work, I find this a really practical
environment, and I often write little 'perl' {java}scripts for text/data
wrangling.

I wrote a little utility that has a jsonpath-like syntax to descend down into
json docs in mongo from the command line, use that a lot.

------
mmahemoff
I can see this being useful. I use bash a lot to deploy small projects, find
it's much easier to get a continuous deployment up and running than the
fancier tools out there, in the early stages at least.

------
SingAlong
Thanks a lot!

I cannot really say how much I needed this. Just yesterday I was writing a
bash script for one of my side-projects and I wrote a ruby script just to
parse JSON and called that ruby script within bash.

------
Cieplak
Very cool, I love the idea of piping JSON. Thank you

------
nknight
It's probably pretty rare, but I actually had a reasonable use case for
something like this some months ago. Worked around it in other ways in the
end.

Wouldn't want to use this for any serious work without any clear license,
though...

~~~
RyanMcGreal
Licence seems pretty clear:

"Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

"The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software."

<https://github.com/dominictarr/JSON.sh/blob/master/LICENCE>

~~~
dominictarr
he was writing before the commit with the licence was pushed.

