We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Question: Is there a way we can preserve carriage return while parsing yaml files? My yaml file looks like this:
keyA: subKeyAA: "some value" subKeyAB: subKeyABA: "again some value" keyB: subKeyBA: "some value" subKeyBB: "something else" keyC: subKeyCA: "some value" subKeyCB: - subKeyCBA: "again some value"
I'm reading the file as a Hashmap, making some changes & then dumping it again, but now it looks like this
keyA: subKeyAA: "changed value" subKeyAB: subKeyABA: "again some value" keyB: subKeyBA: "changed value" subKeyBB: "something else" keyC: subKeyCA: "changed value" subKeyCB: - subKeyCBA: "again some value"
but I want it to look it this:
I have tried enabling & disabling YAMLGenerator.Feature.SPLIT_LINES & YAMLGenerator.Feature.USE_PLATFORM_LINE_BREAKS but it doesn't seem to work.
YAMLGenerator.Feature.SPLIT_LINES
YAMLGenerator.Feature.USE_PLATFORM_LINE_BREAKS
Any help is appreciated.
The text was updated successfully, but these errors were encountered:
formatting details such as line feeds and comments can't really be preserved, they are not part of the data stream
Sorry, something went wrong.
thankyou @yawkat for quick response.
No branches or pull requests
Question: Is there a way we can preserve carriage return while parsing yaml files?
My yaml file looks like this:
I'm reading the file as a Hashmap, making some changes & then dumping it again, but now it looks like this
but I want it to look it this:
I have tried enabling & disabling
YAMLGenerator.Feature.SPLIT_LINES
&YAMLGenerator.Feature.USE_PLATFORM_LINE_BREAKS
but it doesn't seem to work.Any help is appreciated.
The text was updated successfully, but these errors were encountered: