@@ -24,8 +24,8 @@ cat the raw.json to csv/xls use command line tool
24
24
25
25
.. code-block :: bash
26
26
27
- cat raw.json| jsoncsv | mkexcel > output.csv
28
- cat raw.json| jsoncsv | mkexcel -t xls > output.xls
27
+ cat raw.json | jsoncsv | mkexcel > output.csv
28
+ cat raw.json | jsoncsv | mkexcel -t xls > output.xls
29
29
30
30
make sure each line of raw json text file is a json object
31
31
@@ -87,7 +87,7 @@ just expand/restore the json, the expand json is one layer json.
87
87
88
88
jsoncsv raw.json expand.json
89
89
jsoncsv -r expand.json raw.json
90
- cat raw.json| jsoncsv | jsoncsv -r > raw2.json
90
+ cat raw.json | jsoncsv | jsoncsv -r > raw2.json
91
91
92
92
mkexcel the expanded json (one layer)
93
93
@@ -104,17 +104,17 @@ expand json, 展开 json
104
104
105
105
.. code-block :: bash
106
106
107
- jsoncsv -e raw.json expand.json
108
- cat raw.json expand.json
107
+ $ jsoncsv -e raw.json expand.json
108
+ $ cat raw.json expand.json
109
109
{" s" :[1,2,{" w" :1}]}
110
110
{" s.2.w" : 1," s.0" : 1," s.1" : 2}
111
111
112
112
113
- {"s":[1,2,{"w":1}]} transformed to {"s.2.w": 1,"s.0": 1,"s.1": 2}
113
+ {"s":[1,2,{"w":1}]} will transformed to {"s.2.w": 1,"s.0": 1,"s.1": 2}
114
114
115
- expand.json is only one layer json, it can be easy change to csv or xlsx
115
+ the output " expand.json" is only one layer json, it can be easy change to csv or xlsx (with ` mkexcel `)
116
116
117
- -r,--restore
117
+ -r, --restore
118
118
---------------
119
119
restore the expanded json 重构被展开的json
120
120
@@ -127,7 +127,7 @@ restore the expanded json 重构被展开的json
127
127
128
128
{"s.2.w": 1,"s.0": 1,"s.1": 2} change to {"s":[1,2,{"w":1}]}
129
129
130
- -s,--separator
130
+ -s, --separator
131
131
---------------
132
132
133
133
separator used for combine the keys in the tree
@@ -156,7 +156,7 @@ dump expanded (by **jsoncsv**) json file to csv or xls file
156
156
157
157
mkexcel expand.json output.csv
158
158
159
- -t,--type
159
+ -t, --type
160
160
--------------
161
161
162
162
chose dump type in ['csv', 'xls'] default is 'csv'
@@ -191,3 +191,9 @@ wait next next version
191
191
-----------------------------------------
192
192
193
193
but better than python strand library csv.
194
+
195
+ 4. Windows is poor support
196
+ -----------------------------------------
197
+ see https://github.com/alingse/jsoncsv/issues/37
198
+
199
+ try use https://jsoncsv.jsonutil.online/ instead
0 commit comments