Class ConfigJson
java.lang.Object
net.ixdarklord.coolcatcore.internal.config.ConfigJson
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringcompact(com.google.gson.JsonElement json) static <T> ValidationResult<T> decode(com.mojang.serialization.Codec<T> codec, com.google.gson.JsonElement json) static <T> com.google.gson.JsonElementencode(com.mojang.serialization.Codec<T> codec, T value) static <T> ValidationResult<T> static com.google.gson.JsonElementparseLenient(String text) Parses JSON leniently: comments, unquoted keys and single quotes are allowed.
-
Field Details
-
GSON
public static final com.google.gson.Gson GSON
-
-
Method Details
-
encode
public static <T> com.google.gson.JsonElement encode(com.mojang.serialization.Codec<T> codec, T value) -
decode
public static <T> ValidationResult<T> decode(com.mojang.serialization.Codec<T> codec, com.google.gson.JsonElement json) -
parseLenient
public static com.google.gson.JsonElement parseLenient(String text) throws com.google.gson.JsonParseException Parses JSON leniently: comments, unquoted keys and single quotes are allowed.- Throws:
com.google.gson.JsonParseException
-
parse
-
compact
-