diff options
author | 2016-11-28 14:49:47 +0300 | |
---|---|---|
committer | 2016-11-28 14:49:47 +0300 | |
commit | b4225fa075eef58924399f2c5f7a117ee171c2c6 (patch) | |
tree | b952f22ae76467da3ee8bbe79b4f9accd9a0e599 /juick-www/src/main/java/com/juick/www/VKontakteLogin.java | |
parent | 5b2bd7f928bbf9d3233ff029ed5c09ac46daf0de (diff) |
configure json serialization properties
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/VKontakteLogin.java')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/VKontakteLogin.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/VKontakteLogin.java b/juick-www/src/main/java/com/juick/www/VKontakteLogin.java index 83619b2a..1ccf36b6 100644 --- a/juick-www/src/main/java/com/juick/www/VKontakteLogin.java +++ b/juick-www/src/main/java/com/juick/www/VKontakteLogin.java @@ -17,6 +17,7 @@ */ package com.juick.www; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.ObjectMapper; import com.juick.server.UserQueries; import com.juick.www.vk.*; @@ -43,7 +44,13 @@ public class VKontakteLogin { private static final String VK_SECRET = "z2afNI8jA5lIpZ2jsTm1"; private static final String VK_REDIRECT = "http://juick.com/_vklogin"; - private final ObjectMapper mapper = new ObjectMapper(); + public VKontakteLogin() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT); + } + private final ObjectMapper mapper; protected void doGet(JdbcTemplate sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String code = request.getParameter("code"); |