Class KiwiJacksonSerializers


  • public class KiwiJacksonSerializers
    extends Object
    Custom Jackson serializers.

    Jackson databind must be available at runtime.

    • Constructor Detail

      • KiwiJacksonSerializers

        public KiwiJacksonSerializers()
    • Method Detail

      • buildPropertyMaskingSafeSerializerModule

        public static com.fasterxml.jackson.databind.module.SimpleModule buildPropertyMaskingSafeSerializerModule​(List<String> maskedFieldRegexps)
        Build a new SimpleModule that will replace the values of specific fields with a "masked" value and will replace any exceptions with a message indicating the field could not be serialized.

        Uses the default replacement text provided by PropertyMaskingOptions.

        Parameters:
        maskedFieldRegexps - list containing regular expressions that define the properties to mask
        Returns:
        a new SimpleModule
      • buildPropertyMaskingSafeSerializerModule

        public static com.fasterxml.jackson.databind.module.SimpleModule buildPropertyMaskingSafeSerializerModule​(PropertyMaskingOptions options)
        Build a new SimpleModule that will replace the values of specific fields with a "masked" value and will replace any exceptions with a message indicating the field could not be serialized.
        Parameters:
        options - the specific masking and serialization error options to use
        Returns:
        a new SimpleModule
        Implementation Note:
        Per the docs for BeanSerializerModifier.changeProperties(SerializationConfig, BeanDescription, List) the returned list is mutable.