mirror of
https://github.com/CarmJos/EasyConfiguration.git
synced 2026-06-04 10:38:19 +08:00
style: Reformatted code with .editorconfig
This commit is contained in:
@@ -1,8 +1,24 @@
|
||||
# configured-JSON
|
||||
|
||||
JSON file-based implementation, compatible with all Java environments.
|
||||
JSON
|
||||
file-based
|
||||
implementation,
|
||||
compatible
|
||||
with
|
||||
all
|
||||
Java
|
||||
environments.
|
||||
|
||||
**Remember that JSON does not support file comments.**
|
||||
*
|
||||
*Remember
|
||||
that
|
||||
JSON
|
||||
does
|
||||
not
|
||||
support
|
||||
file
|
||||
comments.
|
||||
**
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
||||
@@ -71,4 +71,4 @@
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -17,11 +17,11 @@ import java.util.Objects;
|
||||
public class JSONSource extends FileConfigSource<SourcedSection, Map<String, Object>, JSONSource> {
|
||||
|
||||
public static final @NotNull Gson DEFAULT_GSON = new GsonBuilder()
|
||||
.serializeNulls().disableHtmlEscaping().setPrettyPrinting()
|
||||
.registerTypeAdapter(
|
||||
SourcedSection.class,
|
||||
(JsonSerializer<SourcedSection>) (src, t, c) -> c.serialize(src.data())
|
||||
).create();
|
||||
.serializeNulls().disableHtmlEscaping().setPrettyPrinting()
|
||||
.registerTypeAdapter(
|
||||
SourcedSection.class,
|
||||
(JsonSerializer<SourcedSection>) (src, t, c) -> c.serialize(src.data())
|
||||
).create();
|
||||
|
||||
protected final @NotNull Gson gson;
|
||||
protected @Nullable SourcedSection rootSection;
|
||||
|
||||
Reference in New Issue
Block a user