From 1d5801287eeef991e7d16c5e4b767150aafc9cea Mon Sep 17 00:00:00 2001 From: Fulminazzo Date: Fri, 22 Mar 2024 23:00:58 +0100 Subject: [PATCH] YAMLParser now supports YAML lists not parsed by the parser itself. This means that list of type ```yaml list: - test: "Hello" - test: "Hi" ``` will be parsed as a list of (ConfigurationSection)[src/main/java/it/fulminazzo/yamlparser/configuration/ConfigurationSection]. Totally reworked classes separation to respect packaging conventions. Reworked FileConfiguration#addParsers method. Renamed `it.fulminazzo.yamlparser.configurations` package to `it.fulminazzo.yamlparser.configuration`. Made FileConfiguration and ConfigurationSection final. Added support for escaped dot characters: now it will be able to use `\.` in paths to allow for dotted strings to be parsed. Added support for BigDecimal notation when getting Number types. Added `unquote` method to remove quoted strings when saving or loading. Added `getOptional` method in IConfiguration. Added _gui_ formatting in `FileUtils#formatStringToYaml(String)`. Now IConfiguration extends Serializable. Reworked `FileConfiguration#newYaml` method to support older versions of SnakeYAML. Fixed dotted test error. Fixed `IConfiguration#getKeys` not returning an ordered set. Fixed NullPointerException in `IConfiguration#throwException` method. Fixed MapYAMLParser not supporting primitive types. Fixed `FileConfiguration#getParser` method to look first for equal object classes. Fixed `CollectionYAMLParser` not returning null values in non-specified indexes. Updated README.md. Updated FulmiCollection. --- src/main/java/it/fulminazzo/yamlparser/utils/FileUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/it/fulminazzo/yamlparser/utils/FileUtils.java b/src/main/java/it/fulminazzo/yamlparser/utils/FileUtils.java index 73638a3..35dfae9 100644 --- a/src/main/java/it/fulminazzo/yamlparser/utils/FileUtils.java +++ b/src/main/java/it/fulminazzo/yamlparser/utils/FileUtils.java @@ -231,6 +231,6 @@ public static String formatStringToYaml(@NotNull String string) { if (!s.matches("[A-Z]")) continue; } result.append(s.toLowerCase()); } - return result.toString(); + return result.toString().replace("g-u-i", "gui"); } } \ No newline at end of file