From b4225fa075eef58924399f2c5f7a117ee171c2c6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 28 Nov 2016 14:49:47 +0300 Subject: configure json serialization properties --- .../src/main/java/com/juick/server/protocol/JuickProtocol.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'juick-server') 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); } /** -- cgit v1.2.3