Closed Osiris-Team closed 3 years ago
how did the first file look like?
@portlek Nevermind, I created my own YAML Java-API in 10 days because these random comment errors made me go brrrrrrrrrrrrr.
Comments have been improved in the latest version. Probably this should be now fixed. If someone arrives to this issue please upgrade here. If the problem still persists open a new issue.
Oh dammn thats great! Sadly since then I had to create my own api even though I liked simple yaml a lot :/ Would like to hear what you think about it @Carleslc https://github.com/Osiris-Team/Dyml
Oh dammn thats great! Sadly since then I had to create my own api even though I liked simple yaml a lot :/ Would like to hear what you think about it @Carleslc https://github.com/Osiris-Team/Dyml
Seems promising! I can see one goal of your API is to be fast, that's great. Seems interesting the concept of a YAML Database too, though I don't know if YAML fits for that use-case as the file's structure is not very optimized as in traditional databases. Maybe for small databases or prototyping can be a well fit.
Simple-YAML is more focused on file configurations than large data storage, so time performance is not the highest priority, while easy-of-use is, along with being powerful enough to handle different needs, for instance presentation details like formatting and comment handling.
If you liked Simple-YAML YamlFile
with the latest version you can now provide your own YAML implementation using the setImplementation(YamlImplementation)
method, providing an instance that implements YamlImplementation
interface to load/dump YAML to/from a ConfigurationSection
(current implementations are SimpleYamlImplementation
for the YamlFile default impl. and SnakeYamlImplementation
as an alternative and YamlConfiguration default impl.), so you could for instance use Dyml to handle the parsing / dumping of YAML implementing the YamlImplementation
interface (inheriting YamlImplementationCommentable
class might also be useful but is not required) with something like DymlImplementation
(is an example) while using Simple-YAML for setting/getting values and get the best of both worlds. For that you would instantiate the YamlFile
using the implementation constructor or using setImplementation
method with an instance of DymlImplementation
after creating the YamlFile
object with another constructor.
Also, the Simple-Configuration module is independent of the file format, so it can be used along with your implementation without importing Simple-Yaml module and its dependencies while still using the ConfigurationSection
interface like MemoryConfiguration
or FileConfiguration
classes, if YamlFile
is not needed.
Ohh didn't know you could add different YAML parsers. Good stuff!
Yaml file: (max-days duplicated itself and the # and half of the comment disappeared)