Class ObjectMapperProvider

  • All Implemented Interfaces:
    javax.ws.rs.ext.ContextResolver<com.fasterxml.jackson.databind.ObjectMapper>

    @Provider
    @Produces("application/json")
    public class ObjectMapperProvider
    extends java.lang.Object
    implements javax.ws.rs.ext.ContextResolver<com.fasterxml.jackson.databind.ObjectMapper>
    • Field Detail

      • log

        private static final org.slf4j.Logger log
      • EMPTY_MAP

        private static final com.google.common.base.Function<? super java.lang.Object,​?> EMPTY_MAP
      • MODULE

        private static final com.fasterxml.jackson.databind.module.SimpleModule MODULE
      • OBJECT_MAPPER

        private static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
    • Constructor Detail

      • ObjectMapperProvider

        public ObjectMapperProvider()
    • Method Detail

      • getContext

        public com.fasterxml.jackson.databind.ObjectMapper getContext​(java.lang.Class<?> type)
        Specified by:
        getContext in interface javax.ws.rs.ext.ContextResolver<com.fasterxml.jackson.databind.ObjectMapper>
      • objectMapper

        public static com.fasterxml.jackson.databind.ObjectMapper objectMapper()