ReadYamlMapping does not handle keys with quotes correctly
See original GitHub issueMy 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
output-directory: "/tmp"
Starting with eo-yaml 4.3.1, this is written as
"output-directory": "/tmp"
After parsing the file again, ReadYamlMapping
returns null
when calling yamlMapping.string("output-directory")
. This is different to the behavior of RtYamlMapping
which returns the correct string.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
YAML: Do I need quotes for strings in YAML? - Stack Overflow
In general, you don't need quotes. · Use quotes to force a string, e.g. if your key or value is 10 but you...
Read more >Strings in YAML - To Quote or not to Quote | tinita [blogs.perl.org]
In YAML, you can write a string without quotes, if it doesn't have a special meaning. See the next section for cases where...
Read more >YAML Tutorial: Everything You Need to Get Started in Minutes
The PyYAML package will map a YAML file stream into a dictionary. We'll iterate through the outermost set of keys and values and...
Read more >wrong line reported in 'did not find expected key while parsing ...
Psych::SyntaxError: (/tmp/oops.yaml): did not find expected key while parsing a block mapping at line 1 column 1.
Read more >YAML Ain't Markup Language (YAML™) revision 1.2.2
The primary objectives of this revision are to correct errors and add ... In particular, mapping key order, comments and tag handles should...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
All my tests pass again with 5.0.2. Thanks again!
@stovocor 5.0.2 has just been released, it’s already on Maven Central. I’m closing this. Please feel free to open other Issues if you still have problems or find something else 😃