Closed noobidev closed 5 years ago
Default values are only stored in memory if options().copyDefaults()
is set to false. This option is set to false by default, but is set to true on load()
.
You can enable copying the default options with:
yamlFile.options().copyDefaults(true);
Another option is to use yamlFile.load()
after creating the file with yamlFile.createNewFile(true)
the first time. I've updated the YamlTest.java file using this behavior.
Thank you!
Hi, I added some keys and values to the default map, but they have not been added to this file. So how can I use them for pre-set my yml file? Sorry for my bad English :)