Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 41 lines (30 sloc) 1.011 kb
f1c2064 @dominictarr it's a JSON parser written in bash!
authored
1 # JSON.sh
2
3 yo, so it's a json parser written in bash
4
1be2379 @dominictarr add example to readme
authored
5 pipe json to it, and it traverses the json objects and prints out the
6 path to the current object (as a JSON array) and then the object, without whitespace.
f1c2064 @dominictarr it's a JSON parser written in bash!
authored
7
8 ``` bash
0344f04 @xiongchiamiov Fix Useless Use Of Cat in readme example
xiongchiamiov authored
9 $ json_parse < package.json
1be2379 @dominictarr add example to readme
authored
10 ["name"] "JSON.sh"
11 ["version"] "0.0.0"
12 ["description"] ""
4ec967b @dominictarr update package.json, readme, and add test case for issue 11
authored
13 ["homepage"] "http://github.com/dominictarr/JSON.sh"
1be2379 @dominictarr add example to readme
authored
14 ["repository","type"] "git"
4ec967b @dominictarr update package.json, readme, and add test case for issue 11
authored
15 ["repository","url"] "https://github.com/dominictarr/JSON.sh.git"
16 ["repository"] {"type":"git","url":"https://github.com/dominictarr/JSON.sh.git"}
17 ["bin","json_parse"] "./JSON.sh"
18 ["bin"] {"json_parse":"./JSON.sh"}
1be2379 @dominictarr add example to readme
authored
19 ["dependencies"] {}
20 # ... etc
f1c2064 @dominictarr it's a JSON parser written in bash!
authored
21 ```
22
1be2379 @dominictarr add example to readme
authored
23 a more complex example:
f1c2064 @dominictarr it's a JSON parser written in bash!
authored
24
25 ``` bash
4ec967b @dominictarr update package.json, readme, and add test case for issue 11
authored
26 curl registry.npmjs.org/express | ./JSON.sh | egrep '\["versions","[^"]*"\]'
1be2379 @dominictarr add example to readme
authored
27 ... try it and see
432374e @dominictarr if you have any examples of using JSON.sh with twitter, or whatever, ple...
authored
28 ```
29
30 ## Examples
31
32 If you have any examples with JSON.sh, streaming twitter, github, or whatever!
5ff48e9 @coolaj86 Added Apache License v2 and capitalized README
coolaj86 authored
33 please issue a pull request and i will include them.
34
35 ## LICENSE
36
37 This software is available under the following licenses:
38
39 * MIT
40 * Apache 2
Something went wrong with that request. Please try again.