So I have been across with snakeyaml. I know how to get
their keys using
java
yaml.load(inputStream);
That would return a hashmap of a String and an Object.
Just for demonstration I have a yaml file with values:
player:
randie:
score: 4
When I use
File file = new File("test")
FileInputStream stream = new FileInputStream(file);
Map<String, Object> map = yaml.load(stream);
for (String str : map.keySet()) {
System.out.println(map.get(str));
}
The output would be:
{randie={score=4}}
I came across other stackoverflow questions such as this
I wanted to get a value in the innermost "nested" value without using a list of hashmaps provided by the correct answer in the thread
thanks