Class DefaultJSONMapParsingStrategy<V>

  • Type Parameters:
    V - the map entry type.
    All Implemented Interfaces:
    Function<byte[],​List<Map<String,​V>>>

    public class DefaultJSONMapParsingStrategy<V>
    extends Object
    implements Function<byte[],​List<Map<String,​V>>>
    Deserializes a UTF-8 JSON string into a Map.
    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • objectMapper

        @Nonnull
        private final com.fasterxml.jackson.databind.ObjectMapper objectMapper
        JSON object mapper.
      • mapType

        @Nonnull
        private final com.fasterxml.jackson.databind.type.MapType mapType
        The map type used by object mapper for deserializing the JSON into desired format.
    • Constructor Detail

      • DefaultJSONMapParsingStrategy

        public DefaultJSONMapParsingStrategy​(@Nonnull
                                             com.fasterxml.jackson.databind.ObjectMapper mapper,
                                             @Nonnull
                                             Class<V> valueClass)
        Constructor.
        Parameters:
        mapper - the object mapper to use.
        valueClass - the class for the map value items.
      • DefaultJSONMapParsingStrategy

        public DefaultJSONMapParsingStrategy​(@Nonnull
                                             Class<V> valueClass)
        Constructor.
        Parameters:
        valueClass - the class for the map value items.