Class ListConverter

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.util.Converter<Object,​List<String>>

    public class ListConverter
    extends com.fasterxml.jackson.databind.util.StdConverter<Object,​List<String>>
    A class to facilitate two-step deserialization.
    • Constructor Detail

      • ListConverter

        public ListConverter()
    • Method Detail

      • convert

        public List<String> convert​(Object obj)
        Converts a value to a List of Strings. Conversion is attempted only if parameter obj is already a String or a List. In case of String, a whitespace is assumed as elements separator
        Specified by:
        convert in interface com.fasterxml.jackson.databind.util.Converter<Object,​List<String>>
        Specified by:
        convert in class com.fasterxml.jackson.databind.util.StdConverter<Object,​List<String>>
        Parameters:
        obj - Input object
        Returns:
        A list of strings, empty if obj is null or does not have the expected type