-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Error when generating/serializing keys with multilines and colon #306
Comments
Sounds reasonable that such characters (if and when allowed by YAML) should be properly escaped so that round-trip handling would work. So sounds like a bug. |
Thanks for confirming @cowtowncoder. As far as I can tell this bug is in SnakeYAML? Would that be a fair assessment? |
@eginez what is |
@eginez @cowtowncoder I made a test and it is green:
|
@asomov interesting so the bug could indeed somewhere in the
The only difference is the absence of @asomov |
It does sound like potential Jackson bug. I can probably use/repurpose the original sample; the goal is not so much to replicate what specific SnakeYAML settings produce but to ensure that what is written is read back reliably. I suspect that Jackson's logic that tries to prevent coercion of "NO" into |
I added a simple failing test like so:
and will try to see if I can figure out how to resolve this, since SnakeYAML should be able to handle it properly. |
this is great thanks all!! |
@cowtowncoder feel free to ping me if you need any help |
@asomov Will do if need be, thanks! Fix is in, for 2.13.2 release. Covers linefeed case but I suspect there may be other things that require quoting. |
Hello there
I wanted to report that a key containing a colon
:
followed by new line chars\n
does not seem to be parsing correctly. For example the following test case reproduces the errorI would have expected the parser to quote the key as
\n
and:
are supported yaml content.There is work around for this: Force canonical output.
That however could have other side effects. Maybe I am missing some other configuration that would do the same?
Thoughts, comments are welcomed.
The text was updated successfully, but these errors were encountered: