YamlDotNet
YamlDotNet copied to clipboard
How to serialize properties with blank lines between them
How to place some blank lines between properties. In my case this is helpful for separating sections of the yaml.
Example:
Considering this class:
public class MyYaml
{
public Section Section1 { get; set; }
public Section Section2 { get; set; }
}
I am getting this:
section1:
name: section 1 name
section2:
name: section 2 name
But I want this:
section1:
name: section 1 name
section2:
name: section 2 name
Tried to emmit a Scalar event with a break line, but it does not work properly as introduces some other chars. I guess that there might be a cleaner way of doing this