Repository navigation
Expand file tree
/
Copy pathintegration.tush
More file actions
68 lines (62 loc) · 1.56 KB
/
Copy pathintegration.tush
File metadata and controls
68 lines (62 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
$ echo '[[[]],[]]' | $AWK -f json_parser.awk | $AWK -f json_gron.awk | $AWK -f gron_parser.awk | ./ungron.sh | Indent=2 $AWK -f json_compile.awk
| [
| [
| []
| ],
| []
| ]
$ echo '[1]' | $AWK -f json_parser.awk | $AWK -f json_gron.awk | $AWK -f gron_parser.awk | ./ungron.sh | Indent=2 $AWK -f json_compile.awk
| [
| 1
| ]
== make sure ungron doesn't change order ==
$ cat test_data/4.json | $AWK -f json_parser.awk | $AWK -f json_gron.awk | $AWK -f gron_parser.awk | ./ungron.sh | Indent=2 $AWK -f json_compile.awk
| [
| 1,
| 2,
| 3,
| 4,
| 5,
| 6,
| 7,
| 8,
| 9,
| 10,
| 11,
| 12
| ]
== full gron use-case with grep ==
$ cat test_data/1.json | \
$AWK -f json_parser.awk | \
$AWK -f json_gron.awk | \
grep "org." | \
$AWK -f gron_parser.awk | \
./ungron.sh | \
Indent=2 $AWK -f json_compile.awk
| {
| "web-app": {
| "servlet": [
| {
| "init-param": {
| "dataStoreClass": "org.cofax.SqlDataStore",
| "redirectionClass": "org.cofax.SqlRedirection",
| "templateLoaderClass": "org.cofax.FilesTemplateLoader",
| "templateProcessorClass": "org.cofax.WysiwygTemplate"
| },
| "servlet-class": "org.cofax.cds.CDSServlet"
| },
| {
| "servlet-class": "org.cofax.cds.EmailServlet"
| },
| {
| "servlet-class": "org.cofax.cds.AdminServlet"
| },
| {
| "servlet-class": "org.cofax.cds.FileServlet"
| },
| {
| "servlet-class": "org.cofax.cms.CofaxToolsServlet"
| }
| ]
| }
| }