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

Yaml string not serialized as multiline string #499

Open
asrosent opened this issue Jun 1, 2020 · 0 comments
Open

Yaml string not serialized as multiline string #499

asrosent opened this issue Jun 1, 2020 · 0 comments

Comments

@asrosent
Copy link

asrosent commented Jun 1, 2020

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:

image

I have a class that is wrapping this value
image

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.

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

No branches or pull requests

1 participant