question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReadYamlMapping does not handle keys with quotes correctly

See original GitHub issue

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

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:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
windmuellercommented, Jun 13, 2020

All my tests pass again with 5.0.2. Thanks again!

1reaction
amihaiemilcommented, Jun 13, 2020

@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 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found