Skip to content

Commit

Permalink
Merge pull request #4 from camunda-community-hub/JsonNull
Browse files Browse the repository at this point in the history
Removed Null values from serialization to allow not setting a Size or…
  • Loading branch information
chDame authored Oct 21, 2022
2 parents 2b545cc + 86321b4 commit f3c4be5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/java/io/camunda/operate/util/JsonUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.*;

import io.camunda.operate.dto.SearchResult;

Expand All @@ -25,6 +23,7 @@ private static ObjectMapper getObjectMapper() {
if (mapper == null) {
mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
}
return mapper;
}
Expand Down

0 comments on commit f3c4be5

Please sign in to comment.