2

Using YamlDotNet, the following string;

"blah blah blah \n blah blah blah"

gets serialized as:

test: >-
  blah blah blah

  blah blah blah

Is it possible to have this serialized as

test: |
  blah blah blah
  blah blah blah

dotnet fiddle: https://dotnetfiddle.net/zT1Ujs

edeboursetty
  • 5,669
  • 2
  • 40
  • 67

1 Answers1

4

Found it by searching github, add a [YamlMember(ScalarStyle = ScalarStyle.Literal)] attribute to the property works.

edeboursetty
  • 5,669
  • 2
  • 40
  • 67