Skip to content

Commit

Permalink
YAMLParser now supports YAML lists not parsed by the parser itself.
Browse files Browse the repository at this point in the history
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.
Updated FulmiCollection
Updated README.md
  • Loading branch information
Fulminazzo committed Feb 10, 2024
1 parent 03efc0a commit a66422d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public FileConfiguration(@NotNull String path) {
public FileConfiguration(@NotNull File file) {
super("", null);
this.file = file.getAbsoluteFile();
Map<Object, Object> yaml;
Map<?, ?> yaml;
try {
yaml = newYaml().load(new FileInputStream(file));
} catch (FileNotFoundException e) {
Expand Down Expand Up @@ -69,7 +69,7 @@ public FileConfiguration(InputStream inputStream) {
public FileConfiguration(@Nullable File file, InputStream inputStream) {
super("", null);
this.file = file == null ? null : file.getAbsoluteFile();
Map<Object, Object> yaml = newYaml().load(inputStream);
Map<?, ?> yaml = newYaml().load(inputStream);
this.map.putAll(IConfiguration.generalToConfigMap(this, yaml));
addParsers();
}
Expand Down

0 comments on commit a66422d

Please sign in to comment.