Yaml.load() throws 'End of document expected' exeption for valid document.
Code:
public static void main(String[] args) throws IOException {
String input = ""
+ "- &m1\n"
+ " foo\n"
+ "- bar\n"
;
Object ydoc = Yaml.load(input);
}
Result:
Exception in thread "main" org.ho.yaml.exception.YamlException: Error near line 3: End of document expected.
at org.ho.yaml.JYamlParserEvent.error(Unknown Source)
at org.ho.yaml.YamlDecoder.firstDocument(Unknown Source)
at org.ho.yaml.YamlDecoder.readObject(Unknown Source)
at org.ho.yaml.YamlConfig.load(Unknown Source)
at org.ho.yaml.YamlConfig.load(Unknown Source)
at org.ho.yaml.YamlConfig.load(Unknown Source)
at org.ho.yaml.Yaml.load(Unknown Source)
at net.example.JYamlExample2.main(JYamlExample2.java:14)