LinkedHashMap<String, ArrayList<MyObject>> objMap = new LinkedHashMap<String, ArrayList<MyObject>>();
objMap.add("type1", new ArrayList<MyObject>);
objMap.add("type2", new ArrayList<MyObject>);
Yaml.dump(objMap, new File("out.yml"));
Inserted into the ArrayLists are objects that are subclasses of MyObject. When I use Yaml.dump() to write out the LinkedHashMap to a file, all of the fields of the objects in the ArrayLists are not written to the file. JYaml appears to be trying to dump the correct object class (the tags in the YAML file show the correct class).
Does anyone know what could cause this to happen?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a collection of objects set up as follows:
LinkedHashMap<String, ArrayList<MyObject>> objMap = new LinkedHashMap<String, ArrayList<MyObject>>();
objMap.add("type1", new ArrayList<MyObject>);
objMap.add("type2", new ArrayList<MyObject>);
Yaml.dump(objMap, new File("out.yml"));
Inserted into the ArrayLists are objects that are subclasses of MyObject. When I use Yaml.dump() to write out the LinkedHashMap to a file, all of the fields of the objects in the ArrayLists are not written to the file. JYaml appears to be trying to dump the correct object class (the tags in the YAML file show the correct class).
Does anyone know what could cause this to happen?