-
Notifications
You must be signed in to change notification settings - Fork 2
/
jsonfiddle_cli.yaml
165 lines (132 loc) · 3.52 KB
/
jsonfiddle_cli.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# program name, name for the executable
ProgramName: jsonfiddle
Authors: Tong Sun
Since: 2017
PackageName: main
Name: jsonfiddle
Desc: "JSON Fiddling"
Text: Tool to fiddle with json strings
Verbose: true
Version: true
#UsageLead: "Usage:\\n jsonfiddle [Options] dir [dirs...]"
Options:
- Name: Compact
Type: bool
Flag: 'c,compact'
Usage: Compact JSON data, remove all whitespaces
- Name: Prefix
Type: string
Flag: 'prefix'
Usage: prefix for json string output
Value: ''
- Name: Indent
Type: string
Flag: 'd,indent'
Usage: indent for json string output
Value: ' '
- Name: Protect
Type: bool
Flag: p,protect
Usage: protect {{TEMPLATE}} in JSON data
Command:
- Name: esc
Desc: "Escape json string"
Text: ''
#Text: 'Usage:\n jsonfiddle esc [Options]'
Options:
- Name: Filei
Type: string
Required: true
Flag: 'i,input'
Usage: 'the source to get json string from (or \"-\" for stdin) (mandatory)'
- Name: Fileo
Type: string
Flag: o,output
Value: "-"
Usage: 'the output, default to stdout'
- Name: fmt
Desc: "Format json string"
Text: ''
#Text: 'Usage:\n jsonfiddle fmt [Options]'
Options:
- Name: Filei
Type: string
Required: true
Flag: 'i,input'
Usage: the source to get json string from (mandatory)
- Name: Fileo
Type: string
Flag: o,output
Value: "-"
Usage: 'the output, default to stdout'
- Name: sort
Desc: "Sort json fields recursively"
Text: ''
#Text: 'Usage:\n jsonfiddle sort [Options]'
Options:
- Name: Filei
Type: string
Required: true
Flag: 'i,input'
Usage: the source to get json string from (mandatory)
- Name: Fileo
Type: string
Flag: o,output
Value: "-"
Usage: 'the output, default to stdout'
- Name: j2s
Desc: "JSON to struct"
Text: 'JSON convert to Go struct'
#Text: 'Usage:\n jsonfiddle j2s [Options]'
Options:
- Name: FmtType
Type: string
Flag: f,fmt
Usage: the structural format of the input data (json/yaml)
Value: json
- Name: Filei
Type: string
Required: true
Flag: 'i,input'
Usage: the source of the input JSON (mandatory)
- Name: Fileo
Type: string
Flag: o,output
Value: "-"
Usage: 'the output, default to stdout'
- Name: Name
Type: string
Flag: name
Usage: 'the name of the root struct (default: as input file name)'
- Name: Pkg
Type: string
Flag: pkg
Usage: the name of the package for the generated code
Value: main
- Name: SubStruct
Type: bool
Flag: subStruct
Usage: create types for sub-structs
# - Name: tags
# Type: string
# Flag: tags
# Usage: comma seperated list of the tags to put on the struct, default is the same as fmt
# Value: fmt
# - Name: ForceFloats
# Type: bool
# Flag: forcefloats
# Usage: [experimental] force float64 type for integral values
- Name: x2j
Desc: "XML to JSON"
Text: ''
Options:
- Name: Filei
Type: string
Required: true
Flag: 'i,input'
Usage: the source of the input JSON (mandatory)
- Name: Fileo
Type: string
Flag: o,output
Value: "-"
Usage: 'the output, default to stdout'