YamlDotNet
YamlDotNet copied to clipboard
Yaml string not serialized as multiline string
Hey aaubry, I think I might have found a small bug.
I have a use case where i need to serialize a Yaml string as a property of another string.
the string is the following: "defaultMetricAllow: false\r\ndefaultDimensionsAllow: true\r\nstartsWithFilters:\r\n- overlay_\r\n- descheduler_\r\nmetrics:\r\n node_cpu_usage: \r\n node_disk_read_bytes_total_rate: \r\n container_cpu_usage: \r\n pod_memory_usage: \r\n node_status: \r\n"
which in translates to:

I have a class that is wrapping this value

My expected behaviour: object should be serialized as
Value: |- defaultMetricAllow: false defaultDimensionsAllow: true etc...
Actual behaviour: object is serialized as
Value: "defaultMetricAllow: false\r\ndefaultDimensionsAllow: true\r\nstartsWithFilters:\r\n- overlay_\r\n- descheduler_\r\nmetrics:\r\n node_cpu_usage: \r\n node_disk_read_bytes_total_rate: \r\n container_cpu_usage: \r\n pod_memory_usage: \r\n node_status: \r\n"
thanks! asaf.