From 5c993151c554becbc8574ae8f77ccde6945d72da Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 12 Dec 2016 23:42:26 +0300 Subject: juick-ws: fix serializer properties --- juick-ws/src/main/java/com/juick/ws/XMPPConnection.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'juick-ws/src') 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)) -- cgit v1.2.3