I am using YAML to pass in a string of comma delimited values for a new relic config file to ignore errors. I need the output to look like this:
"NotFoundError,LocationError,InvalidParamsError"
I tried using folded style and stripping the last newline. My yaml file looks like this:
ignore_errors: >-
NotFoundError,
LocationError,
InvalidParamsError
However, it parses the other newlines as a space in the end giving me something like this:
"NotFoundError, LocationError, InvalidParamsError"
I need it to parse the folded string and not add spaces. Please help.
The only way to do this is to quote your string and escape the end of each line with \
:
ignore_errors: "\
NotFoundError,\
LocationError,\
InvalidParamsError"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With