Using JYaml 1.3 and 1.2, I tried to parse a YAML file (see test1.yml attachment). I got an "End of document expected" parser error from JYaml.
When I modified the YAML file (see test2.yml attachment), it reads the document as a list of 2 maps with each map corresponding to the sequence under the organizations mapping.
It should have read test1.yml as a list of maps, and test2.yml as a map with 1 entry which would be a list of maps.
I parsed these same documents with Snake-YAML 1.3 and it worked as expected.
I attached the code I used to load these documents (see JYamlTest.java attachment).
1st sample YAML file
2nd sample YAML file
Sample code that loads test1.yml and test2.yml
This is a duplicate of bug 2829765. You can delete that one, since I cannot upload multiple files unless I log in first.
Why don't you use SnakeYAML ? Do you miss any features in SnakeYAML?
-Andrey
I did end up using SnakeYAML. I submitted the bug report so that if it got fixed, other users of JYaml could benefit. Is JYaml not being maintained anymore?
I am afraid SnakeYAML is the only maintained YAML parser for Java. I do not know the status of the parser for JRuby. But it is not an option for me anyway.