Yaml file with out class tag

29 views
Skip to first unread message

Suman Ghosh

unread,
Nov 30, 2020, 3:50:04 PM11/30/20
to yamlbeans-users
is there way to read yaml file without taking the help of class tag , is there any other option except class tags

Nate

unread,
Nov 30, 2020, 5:06:44 PM11/30/20
to yamlbeans-users
Class tags are written when the class isn't known from the Java class definitions. Eg, if you have a field that is java.util.List (an interface), YamlBeans can't know what the concrete type of that object is, and so has to write class tags. If your field is ArrayList then the class tag isn't written when the object is an ArrayList. However, if the object is a subclass of ArrayList, then the class tag must be written because the type doesn't match the class definition.
Reply all
Reply to author
Forward
0 new messages