Class SerializerImpl

    • Constructor Detail

      • SerializerImpl

        public SerializerImpl​(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • Method Detail

      • serialize

        public String serialize​(Object object)
        Description copied from interface: Serializer
        Serializes the given object into a String.
        Specified by:
        serialize in interface Serializer
        Parameters:
        object - the object to serialize
        Returns:
        the serialized object.
      • deserialize

        public <E> E deserialize​(String input,
                                 Class<E> type)
        Description copied from interface: Serializer
        Deserialize the given input into an object of the given class.
        Specified by:
        deserialize in interface Serializer
        Parameters:
        input - the input to deserialize
        type - the type of the result object
        Returns:
        the deserialized object.
      • deserialize

        public <E> E deserialize​(File file,
                                 Class<E> type)
        Description copied from interface: Serializer
        Deserialize the given file content into an object of the given class.
        Specified by:
        deserialize in interface Serializer
        Parameters:
        file - the file containing the input to deserialize
        type - the type of the result object
        Returns:
        the deserialized object.
      • deserialize

        public <E> E deserialize​(InputStream input,
                                 Class<E> type)
        Description copied from interface: Serializer
        Deserialize the given input into an object of the given class.
        Specified by:
        deserialize in interface Serializer
        Parameters:
        input - the input to deserialize
        type - the type of the result object
        Returns:
        the deserialized object.