First of all, Merry Christmas to everyone!
Now to my question:
Let's say I have the class Outer
with some inner class Inner. As a field in Outer
, I have a List<Inner>
, which i then want to dump to a YAML file. I do this like so:
Outer o = new Outer();
o.innerList = new ArrayList<Inner>();
o.innerList.add(new o.Inner());
...
Yaml.dump(o, new File("test.yml");
This gives me the exception: Exception in thread "main" org.ho.yaml.exception.ObjectCreationException: Error near line 0: Can't create object of type class game.Outer$Inner using default constructor.
I tried providing a custom constructor and changing the access level to public, to no help. Any ideas?