From 84c75d9b3d83cbc9df258050fd0f38b67ff0d724 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Mon, 21 Mar 2016 17:17:15 -0700 Subject: [PATCH] #742 Hide RFC1123 on parameters --- .../com/microsoft/rest/serializer/JacksonMapperAdapter.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client-runtime/src/main/java/com/microsoft/rest/serializer/JacksonMapperAdapter.java b/client-runtime/src/main/java/com/microsoft/rest/serializer/JacksonMapperAdapter.java index 97abf853630bb..ae2af3c5f6ace 100644 --- a/client-runtime/src/main/java/com/microsoft/rest/serializer/JacksonMapperAdapter.java +++ b/client-runtime/src/main/java/com/microsoft/rest/serializer/JacksonMapperAdapter.java @@ -7,6 +7,7 @@ package com.microsoft.rest.serializer; +import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; @@ -58,6 +59,10 @@ protected void initializeObjectMapper(ObjectMapper mapper) { .registerModule(DateTimeSerializer.getModule()) .registerModule(DateTimeRfc1123Serializer.getModule()) .registerModule(HeadersSerializer.getModule()); + mapper.setVisibility(mapper.getSerializationConfig().getDefaultVisibilityChecker() + .withFieldVisibility(JsonAutoDetect.Visibility.ANY) + .withSetterVisibility(JsonAutoDetect.Visibility.NONE) + .withGetterVisibility(JsonAutoDetect.Visibility.NONE)); } /**