Skip to content

Commit

Permalink
模型序列化json排除非空属性缩小模型字符体积
Browse files Browse the repository at this point in the history
qmdx committed Dec 18, 2024
1 parent 2dcded2 commit 34a1cc9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@

import com.aizuda.bpm.engine.assist.Assert;
import com.aizuda.bpm.engine.handler.FlowJsonHandler;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -27,6 +28,7 @@ public class FlowJacksonHandler implements FlowJsonHandler {
static {
OBJECT_MAPPER.registerModule(new JavaTimeModule());
OBJECT_MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
OBJECT_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
}

@Override

0 comments on commit 34a1cc9

Please sign in to comment.