Closed GoogleCodeExporter closed 9 years ago
I've gotten a fairly simple workaround for this: I read in the file and do some
string manipulations on it to: split each document into a separate string, and
then prepend the original directives to each string. Then, for each string,
yaml.load(str).
Original comment by robinETm...@gmail.com
on 8 Jun 2012 at 6:41
[deleted comment]
Started.
http://code.google.com/p/snakeyaml/source/browse/src/test/java/org/yaml/snakeyam
l/issues/issue149/GlobalDirectivesTest.java
Original comment by py4fun@gmail.com
on 11 Jun 2012 at 5:33
Fixed. Feel free to test the source. This YAML is parsed without errors:
http://code.google.com/p/snakeyaml/source/browse/src/test/resources/issues/issue
149-losing-directives.yaml
The fix will be delivered in version 1.11
A few conclusions:
1) PyYAML has the same problem. If this YAML document has to be parsed in
Python, it may fail (I am not sure what happens if libyaml is used)
2) If the original YAML document was generated with yaml-cpp
(http://code.google.com/p/yaml-cpp/) then you may get unexpected errors because
yaml-cpp implements YAML 1.2 while SnakeYAML is still with YAML 1.1
Original comment by py4fun@gmail.com
on 13 Jun 2012 at 11:33
http://code.google.com/p/snakeyaml/wiki/changes
Original comment by py4fun@gmail.com
on 17 Jun 2012 at 10:43
Original issue reported on code.google.com by
robinETm...@gmail.com
on 6 Jun 2012 at 7:50Attachments: