From: YuanHu Date: Tue, 17 Apr 2018 06:38:56 +0000 (+0800) Subject: Not Serialize the Null Fields X-Git-Tag: v1.1.0~10 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F55%2F43255%2F1;p=sdc%2Fsdc-workflow-designer.git Not Serialize the Null Fields Not Serialize the Null Fields, like 'clazz' to script task, 'script format'/'script' to service task. Issue-ID: SDC-1236 Change-Id: I50ea943a3863c1164d9eede33768d0433d662b2b Signed-off-by: YuanHu --- diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/Content.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/Content.java index 70d59928..2a49ae07 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/Content.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/Content.java @@ -13,12 +13,15 @@ package org.onap.sdc.workflowdesigner.resources.entity; import java.util.Map; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.gson.annotations.SerializedName; /** * */ +@JsonInclude(Include.NON_NULL) public class Content { @JsonProperty(value="class") // for dropwizard's Jackson @SerializedName("class") // for Gson diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtActivity.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtActivity.java index 46661713..5a798ee2 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtActivity.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtActivity.java @@ -11,9 +11,13 @@ */ package org.onap.sdc.workflowdesigner.resources.entity; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + /** * */ +@JsonInclude(Include.NON_NULL) public class ExtActivity { private String id;