diff options
author | andre.schmid <andre.schmid@est.tech> | 2022-03-07 18:48:09 +0000 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2022-03-11 16:48:13 +0000 |
commit | e5488e5e3623646125802b8ab7e12b7159a2c0d3 (patch) | |
tree | 58c896b9d2f434041cff1cafad7835dd9cd691f3 /common-app-api/src/main/java/org | |
parent | f13f58eb867c763e6ed1c3b674fd99b1081a0664 (diff) |
Support complex types in artifact properties
Adds support to complex types in artifact properties of an interface
operation implementation.
Change-Id: I7a82a3652541b35230fe4ce87bf703a1dbe72d50
Issue-ID: SDC-3899
Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'common-app-api/src/main/java/org')
-rw-r--r-- | common-app-api/src/main/java/org/openecomp/sdc/common/util/JsonUtils.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/util/JsonUtils.java b/common-app-api/src/main/java/org/openecomp/sdc/common/util/JsonUtils.java index be534d2909..c76310ecf4 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/util/JsonUtils.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/util/JsonUtils.java @@ -24,6 +24,10 @@ import com.google.gson.JsonObject; public class JsonUtils { + private JsonUtils() { + + } + public static String toString(JsonElement jsonElement) { if (jsonElement == null) { return null; @@ -48,6 +52,9 @@ public class JsonUtils { } public static boolean isEmptyJson(final JsonElement json) { + if (json == null || json.isJsonNull()) { + return true; + } if (json.isJsonArray()) { return json.getAsJsonArray().isEmpty(); } |