Ignore fields from yaml when parsing it using SnakeYaml (Cannot find property in class)

I use SnakeYaml to parse the yaml file, is there anyway to ignore the properties from the yaml file?

+6
source share
1 answer

I found this:)

Representer representer = new Representer(); representer.getPropertyUtils().setSkipMissingProperties(true); Yaml yaml = new Yaml(new Constructor(MyClass.class),representer); 
+11
source

Source: https://habr.com/ru/post/986951/


All Articles