🎨 修复 GsonParser 与低版本 Gson 的兼容性问题
This commit is contained in:
@@ -12,14 +12,14 @@ import java.io.Reader;
|
||||
public class GsonParser {
|
||||
|
||||
public static JsonObject parse(String json) {
|
||||
return JsonParser.parseString(json).getAsJsonObject();
|
||||
return new JsonParser().parse(json).getAsJsonObject();
|
||||
}
|
||||
|
||||
public static JsonObject parse(Reader json) {
|
||||
return JsonParser.parseReader(json).getAsJsonObject();
|
||||
return new JsonParser().parse(json).getAsJsonObject();
|
||||
}
|
||||
|
||||
public static JsonObject parse(JsonReader json) {
|
||||
return JsonParser.parseReader(json).getAsJsonObject();
|
||||
return new JsonParser().parse(json).getAsJsonObject();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user