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

How to serialize properties with blank lines between them #803

Open
emanuel-v-r opened this issue Apr 27, 2023 · 0 comments
Open

How to serialize properties with blank lines between them #803

emanuel-v-r opened this issue Apr 27, 2023 · 0 comments
Assignees

Comments

@emanuel-v-r
Copy link

emanuel-v-r commented Apr 27, 2023

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

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

No branches or pull requests

3 participants