psych
psych copied to clipboard
how to add indentation for array element
When psych dump object to yaml file, I hope psych can add indentation for array element, for example:
parent:
- child
- child
And yet it is:
parent:
- child
- child
So I wonder how to add indentation for array element. Look forward to your solution, thanks very much.
Seconding this, it would be nice to have support for array indentation following the indentation option passed to dump or to_yaml would be ideal. If this already exists I haven't been able to find any sort of documentation referencing it.
If it needs to be implemented then I'd be interested in implementing this feature :+1:
It looks much better with indentation