|jadedctrl e68ded350c Fixes||3 months ago|
|LICENSE||3 months ago|
|README.md||3 months ago|
|example.json||3 months ago|
|json.sh||3 months ago|
json.sh is a very portable JSON parser-- it should work in just about any shell you throw at it. Right now, it can only parse and output variables etc in a JSON file in a more script-friendly form, but write support will be added later.
To use json.sh, you can simply run
json.sh with a filename as an argument.
Here's an example command and it's output:
$ sh json.sh example.json /animals /animals/pig /animals/pig/tail /animals/pig/tail = curly /animals/pig/nose /animals/pig/nose = adorable /animals/sheep /animals/sheep/tail /animals/sheep/tail = short /animals/sheep/nose /animals/sheep/nose = ugly
There are also a few useful arguments you should keep note of:
||Only print variables with the name
||Only print the value of the variable
||Only print variables with the value
||Only print the object
-s, for example,
$string could be anything from
Same syntax goes for
-V is the only odd one out-- it's
$string needs to be a variable's value, like
All of json.sh is released under the ISC license.