Say I have a Yaml file,
people:
- name : Joe
surname : Barber
age : 16
- name : Andy
surname : Lots
age : 17
And I have a class like this,
public class people {
private String name;
private String surname;
private String age;
}
How can I get a list of people objects from a Yaml file? Just getting the value from the key in the file is quite simple, but matching it with a collection of objects is not. I am using snakeYaml lib.
Ernie source
share