mirror of
https://gitee.com/BDWare/common
synced 2026-01-29 00:39:30 +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) {
|
public static JsonObject parseObjectAsJsonObject(Object obj) {
|
||||||
return GSON.toJsonTree(obj).getAsJsonObject();
|
return GSON.toJsonTree(obj).getAsJsonObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static JsonElement parseObject(Object obj) {
|
||||||
|
return GSON.toJsonTree(obj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user