aboutsummaryrefslogtreecommitdiff
path: root/juick-ws
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-12-12 23:42:26 +0300
committerGravatar Vitaly Takmazov2016-12-12 23:42:26 +0300
commit5c993151c554becbc8574ae8f77ccde6945d72da (patch)
tree8af6b83f2d6fd885b73ebff6fc186722e27c3dfb /juick-ws
parentcecbc5063bc173f4a25f0e5366a5dbf3b1c70e0a (diff)
juick-ws: fix serializer properties
Diffstat (limited to 'juick-ws')
-rw-r--r--juick-ws/src/main/java/com/juick/ws/XMPPConnection.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java b/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java
index 7b456c3e..ca792a1a 100644
--- a/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java
+++ b/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java
@@ -1,5 +1,6 @@
package com.juick.ws;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.juick.User;
@@ -56,6 +57,9 @@ public class XMPPConnection implements AutoCloseable {
wsJid = env.getProperty("ws_jid", "ws.juick.local");
ms = new ObjectMapper();
+ ms.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
+ ms.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ ms.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT);
XmppSessionConfiguration configuration = XmppSessionConfiguration.builder()
.extensions(Extension.of(com.juick.Message.class))