diff --git a/build.gradle b/build.gradle index c14d0a0..a3ac1a4 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ dependencies { api 'berkeleydb:je:3.2.76' api 'com.fifesoft:rsyntaxtextarea:3.1.3' api 'commons-io:commons-io:2.11.0' - api 'io.netty:netty-all:4.1.52.Final' + api 'io.netty:netty-all:4.1.63.Final' api 'org.antlr:antlr4:4.9.2' api 'commons-codec:commons-codec:1.5' api 'org.apache.logging.log4j:log4j-core:2.17.0' @@ -53,4 +53,4 @@ task copyJar(type: Copy) { from "./build/libs/$project.name-${version}.jar" into "./build/output/" rename { String fileName -> "yjs.jar" } -} \ No newline at end of file +} diff --git a/src/main/base/org/bdware/sc/util/JsonUtil.java b/src/main/base/org/bdware/sc/util/JsonUtil.java index ad9b2cc..3f79cf4 100644 --- a/src/main/base/org/bdware/sc/util/JsonUtil.java +++ b/src/main/base/org/bdware/sc/util/JsonUtil.java @@ -1,11 +1,8 @@ package org.bdware.sc.util; import com.google.gson.*; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.io.Reader; -import java.io.Writer; import java.lang.reflect.Type; public class JsonUtil { @@ -43,9 +40,11 @@ public class JsonUtil { public static JsonObject parseStringAsJsonObject(String json) { return JsonParser.parseString(json).getAsJsonObject(); } + public static JsonElement parseString(String json) { return JsonParser.parseString(json); } + public static JsonObject parseReaderAsJsonObject(Reader reader) { return JsonParser.parseReader(reader).getAsJsonObject(); }