Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing file output option separate first level in yaml #2

Open
cesarjorgemartinez opened this issue Mar 7, 2017 · 2 comments
Open

Comments

@cesarjorgemartinez
Copy link

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

@drbild
Copy link
Owner

drbild commented Mar 8, 2017

This should be possible. It'll be a couple of days before I have a chance to work on it though.

@cesarjorgemartinez
Copy link
Author

A provisional workaround, test if work:
cat myfile.json | json2yaml | perl -0 -pe 's/(\n\s+.+\n)([^\s]+|$)/\1\n\2/gim'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants