mirror of
https://gitee.com/BDWare/common
synced 2025-01-10 01:44:16 +00:00
chore: update build.gradle
upgrade io.netty:netty-all from 4.1.52.Final to 4.1.63.Final; optimize imports in JsonUtil
This commit is contained in:
parent
d10337e42b
commit
72878eff91
@ -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'
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user