json2yaml
json2yaml copied to clipboard
Processing file output option separate first level in yaml
Hi, I see your json2yaml and is a great tool. When use a big json file, and covert into a yaml file, write all in each line, the is difficult read without a separator. An example is: test1: ...... ...... test2: ...... ...... .....
Exist a option or workaround to generate the first level with a empty line? Example: test1: ...... ......
test2: ...... ......
.....
Regards
This should be possible. It'll be a couple of days before I have a chance to work on it though.
A provisional workaround, test if work: cat myfile.json | json2yaml | perl -0 -pe 's/(\n\s+.+\n)([^\s]+|$)/\1\n\2/gim'