-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
ReadYamlMapping does not handle keys with quotes correctly #357
Comments
@stovocor Well, RtYamlMapping is used for building a YamlMapping, whereas ReadYamlMapping is the one used for reading one -- it's different logic inside them. Have you tried the latest version, |
Yes, the issue is still present with 5.0.1. I created a small test case for the class. I could also add one for actually writing and reading a file. |
@stovocor thanks. This test should be enough. I'll have a look and try to fix it asap. |
Thank you very much for the quick response! |
@stovocor I'm curious whether keys between quotes is correct in YAML or not? Your tests started failing because since |
At least they are uncommon. I would prefer for eo-yaml to write them without quotes. In that case my test is no longer valid. |
@stovocor I also see they are used sometimes: https://stackoverflow.com/questions/14873227/escaping-colons-in-yaml/56718286 I think escaping should happen if the key contains special chars like |
@rultor release it please, tag is |
@amihaiemil OK, I will release it now. Please check the progress here |
@amihaiemil Done! FYI, the full log is here (took me 4min) |
@stovocor 5.0.2 has just been released, it's already on Maven Central. |
All my tests pass again with 5.0.2. Thanks again! |
My application uses eo-yaml for reading and writing YAML files. When upgrading from 4.3.0 to 4.3.1, my tests fail because the written file can not be parsed correctly.
The issue is a key containing a hyphen, like
Starting with eo-yaml 4.3.1, this is written as
After parsing the file again,
ReadYamlMapping
returnsnull
when callingyamlMapping.string("output-directory")
. This is different to the behavior ofRtYamlMapping
which returns the correct string.The text was updated successfully, but these errors were encountered: