Class JacksonSerializer<T>

    • Constructor Summary

      Constructors 
      Constructor Description
      JacksonSerializer​(com.fasterxml.jackson.core.type.TypeReference<T> typeReference, boolean storeAsBson)
      Constructs a serializer with JSON representation based on Jackson along with TypeReference-based type information.
      JacksonSerializer​(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.core.type.TypeReference<T> typeReference, boolean storeAsBson)
      Constructs a serializer with JSON representation based on Jackson along with a customizable ObjectMapper and TypeReference-based type information.
      JacksonSerializer​(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? super T> typeClass, boolean storeAsBson)
      Constructs a serializer with JSON representation based on Jackson along with a customizable ObjectMapper and Class-based type information.
      JacksonSerializer​(Class<? super T> typeClass, boolean storeAsBson)
      Constructs a serializer with JSON representation based on Jackson along with Class-based type information.
    • Constructor Detail

      • JacksonSerializer

        public JacksonSerializer​(Class<? super T> typeClass,
                                 boolean storeAsBson)
        Constructs a serializer with JSON representation based on Jackson along with Class-based type information.
        Parameters:
        typeClass - the Class of the object to serialize
        storeAsBson - true for BSON encoding or false for string encoding
      • JacksonSerializer

        public JacksonSerializer​(com.fasterxml.jackson.core.type.TypeReference<T> typeReference,
                                 boolean storeAsBson)
        Constructs a serializer with JSON representation based on Jackson along with TypeReference-based type information.
        Parameters:
        typeReference - the TypeReference of the object to serialize
        storeAsBson - true for BSON encoding or false for string encoding
      • JacksonSerializer

        public JacksonSerializer​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                 Class<? super T> typeClass,
                                 boolean storeAsBson)
        Constructs a serializer with JSON representation based on Jackson along with a customizable ObjectMapper and Class-based type information.
        Parameters:
        objectMapper - the customized ObjectMapper
        typeClass - the Class of the object to serialize
        storeAsBson - true for BSON encoding or false for string encoding
      • JacksonSerializer

        public JacksonSerializer​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                 com.fasterxml.jackson.core.type.TypeReference<T> typeReference,
                                 boolean storeAsBson)
        Constructs a serializer with JSON representation based on Jackson along with a customizable ObjectMapper and TypeReference-based type information.
        Parameters:
        objectMapper - the customized ObjectMapper
        typeReference - the TypeReference of the object to serialize
        storeAsBson - true for BSON encoding or false for string encoding