aboutsummaryrefslogtreecommitdiff
path: root/juick-server
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-28 14:49:47 +0300
committerGravatar Vitaly Takmazov2016-11-28 14:49:47 +0300
commitb4225fa075eef58924399f2c5f7a117ee171c2c6 (patch)
treeb952f22ae76467da3ee8bbe79b4f9accd9a0e599 /juick-server
parent5b2bd7f928bbf9d3233ff029ed5c09ac46daf0de (diff)
configure json serialization properties
Diffstat (limited to 'juick-server')
-rw-r--r--juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java b/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java
index 6bd8e11f..1bac9fce 100644
--- a/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java
+++ b/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java
@@ -1,5 +1,6 @@
package com.juick.server.protocol;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.juick.Message;
@@ -30,6 +31,9 @@ public class JuickProtocol {
public JuickProtocol(JdbcTemplate sql, String baseUri) {
this.sql = sql;
this.baseUri = baseUri;
+ json.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
+ json.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ json.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT);
}
/**