mirror of
https://gitee.com/BDWare/common
synced 2026-01-28 16:29:29 +00:00
feat: update JsonUtil
add JsonUtil.parseObject to return JsonElement
This commit is contained in:
@@ -48,4 +48,8 @@ public class JsonUtil {
|
||||
public static JsonObject parseObjectAsJsonObject(Object obj) {
|
||||
return GSON.toJsonTree(obj).getAsJsonObject();
|
||||
}
|
||||
|
||||
public static JsonElement parseObject(Object obj) {
|
||||
return GSON.toJsonTree(obj);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user