Class JacksonHashMapper.JacksonHashMapperBuilder<B extends tools.jackson.databind.cfg.MapperBuilder<? extends tools.jackson.databind.ObjectMapper,? extends tools.jackson.databind.cfg.MapperBuilder<?,?>>>

java.lang.Object
io.valkey.springframework.data.valkey.hash.JacksonHashMapper.JacksonHashMapperBuilder<B>
Type Parameters:
B - type of the MapperBuilder.
Enclosing class:
JacksonHashMapper

public static class JacksonHashMapper.JacksonHashMapperBuilder<B extends tools.jackson.databind.cfg.MapperBuilder<? extends tools.jackson.databind.ObjectMapper,? extends tools.jackson.databind.cfg.MapperBuilder<?,?>>> extends Object
Builder to create a JacksonHashMapper instance.
  • Method Details

    • flatten

      @Contract("-> this") public JacksonHashMapper.JacksonHashMapperBuilder<B> flatten()
      Use a flattened representation using dot notation. The default is to use hierarchical().
      Returns:
      this builder.
    • hierarchical

      @Contract("-> this") public JacksonHashMapper.JacksonHashMapperBuilder<B> hierarchical()
      Use a hierarchical node structure as created by Jackson. This is the default behavior.
      Returns:
      this builder.
    • flatten

      @Contract("_ -> this") public JacksonHashMapper.JacksonHashMapperBuilder<B> flatten(boolean flatten)
      Configure whether to flatten the resulting hash using dot notation for properties. The default is to use hierarchical().
      Parameters:
      flatten - boolean used to configure whether JSON de/serialized Object properties will be un/flattened using dot notation, or whether to retain the hierarchical node structure created by Jackson.
      Returns:
      this builder.
    • jackson2CompatibilityMode

      @Contract("-> this") public JacksonHashMapper.JacksonHashMapperBuilder<B> jackson2CompatibilityMode()
      Enable Jackson 2 compatibility mode. This enables reading values written by Jackson2HashMapper and writing values that can be read by Jackson2HashMapper.
      Returns:
      this builder.
    • typeValidator

      @Contract("_ -> this") public JacksonHashMapper.JacksonHashMapperBuilder<B> typeValidator(tools.jackson.databind.jsontype.PolymorphicTypeValidator typeValidator)
      Provide a PolymorphicTypeValidator to validate polymorphic types during deserialization.
      Parameters:
      typeValidator - the validator to use, defaults to a permissive validator that allows all types.
      Returns:
      this builder.
    • customize

      @Contract("_ -> this") public JacksonHashMapper.JacksonHashMapperBuilder<B> customize(Consumer<B> mapperBuilderCustomizer)
      Provide a customizer to configure the ObjectMapper through its MapperBuilder.
      Parameters:
      mapperBuilderCustomizer - the configurer to apply to the ObjectMapper builder.
      Returns:
      this builder.
    • build

      @Contract("-> new") public JacksonHashMapper build()
      Build a new JacksonHashMapper instance with the configured settings.
      Returns:
      a new JacksonHashMapper instance.