From aa225980fac263789e5da3d93230e11c929eb105 Mon Sep 17 00:00:00 2001 From: "Frank.R.Wu" Date: Wed, 17 Nov 2021 14:50:07 +0800 Subject: [PATCH] feat: update JsonUtil add JsonUtil.parseObject to return JsonElement --- src/main/base/org/bdware/sc/util/JsonUtil.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/base/org/bdware/sc/util/JsonUtil.java b/src/main/base/org/bdware/sc/util/JsonUtil.java index de88174..887667a 100644 --- a/src/main/base/org/bdware/sc/util/JsonUtil.java +++ b/src/main/base/org/bdware/sc/util/JsonUtil.java @@ -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); + } }