Enum Digest.Feature

    • Enum Constant Detail

      • IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_NULL

        public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_NULL
        Ignore JSON key-value entries whose value is null. In other words, JSON key-value entries whose value is null are treated as if they did not exist.

        If this feature is enabled, two JSONs below generate the same digest value.

         { "key1":"value1", "key2":null }
         { "key1":"value1" }
         

        The default value is 'disabled'.

      • IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_FALSE

        public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_FALSE
        Ignore JSON key-value entries whose value is false. In other words, JSON key-value entries whose value is false are treated as if they did not exist.

        If this feature is enabled, two JSONs below generate the same digest value.

         { "key1":"value1", "key2":false }
         { "key1":"value1" }
         

        The default value is 'disabled'.

      • IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_ZERO

        public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_ZERO
        Ignore JSON key-value entries whose value is zero. In other words, JSON key-value entries whose value is zero are treated as if they did not exist.

        If this feature is enabled, two JSONs below generate the same digest value.

         { "key1":"value1", "key2":0, "key3":0.0 }
         { "key1":"value1" }
         

        The default value is 'disabled'.

      • IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_STRING

        public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_STRING
        Ignore JSON key-value entries whose value is an empty string. In other words, JSON key-value entries whose value is an empty string are treated as if they did not exist.

        If this feature is enabled, two JSONs below generate the same digest value.

         { "key1":"value1", "key2":"" }
         { "key1":"value1" }
         

        The default value is 'disabled'.

      • IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_ARRAY

        public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_ARRAY
        Ignore JSON key-value entries whose value is an empty array. In other words, JSON key-value entries whose value is an empty array are treated as if they did not exist.

        If this feature is enabled, two JSONs below generate the same digest value.

         { "key1":"value1", "key2":[] }
         { "key1":"value1" }
         

        The default value is 'disabled'.

      • IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_OBJECT

        public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_OBJECT
        Ignore JSON key-value entries whose value is an empty object. In other words, JSON key-value entries whose value is an empty object are treated as if they did not exist.

        If this feature is enabled, two JSONs below generate the same digest value.

         { "key1":"value1", "key2":{} }
         { "key1":"value1" }
         

        The default value is 'disabled'.

      • SORT_JSON_OBJECT_ENTRY_KEYS

        public static final Digest.Feature SORT_JSON_OBJECT_ENTRY_KEYS
        Sort keys of JSON key-value entries before updating.

        If this feature is enabled, two JSONs below generate the same digest value.

         { "key1":"value1", "key2":"value2" }
         { "key2":"value2", "key1":"value1" }
         

        The default value is 'enabled'.

    • Method Detail

      • values

        public static Digest.Feature[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Digest.Feature c : Digest.Feature.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Digest.Feature valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null