6 ms·
JSON.sh: a JSON parser written in bash
- nknight 15y agoIt'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 15y agoLicence 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 https://github.com/dominictarr/JSON.sh/blob/master/LICENCE
- dominictarr 15y agohe was writing before the commit with the licence was pushed.
- dominictarr 15y agoit is now MIT licenced. yeah, I think there are plenty of reasonable uses for bash, like before any thing else is installed... aka, devops.
- Cieplak 15y agoVery cool, I love the idea of piping JSON. Thank you
- gourneau 15y agoI 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 https://github.com/micha/resty) to really make your life easier.
- a3_nm 15y agoFor more elaborate stuff, you can also use jshon (http://kmkeen.com/jshon/ http://kmkeen.com/jshon/).
- alexatkeplar 15y agoWhoah - Resty is awesome. Wish I'd known about it before
- gord 15y agolike 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.
- SingAlong 15y agoThanks 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.
- mmahemoff 15y agoI 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.
- simondlr 15y agoAwesome. 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-print-json-script http://stackoverflow.com/questions/352098/how-to-pretty-prin...
- pjo 15y agoYou can also use the python json.tool $ echo '{"json":"obj"}' | python -mjson.tool { "json": "obj" } http://docs.python.org/library/json.html http://docs.python.org/library/json.html