public static enum Digest.Feature extends Enum<Digest.Feature>
Enum Constant and Description |
---|
IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_ARRAY
Ignore JSON key-value entries whose value is an empty array.
|
IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_OBJECT
Ignore JSON key-value entries whose value is an empty object.
|
IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_STRING
Ignore JSON key-value entries whose value is an empty string.
|
IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_FALSE
Ignore JSON key-value entries whose value is
false . |
IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_NULL
Ignore JSON key-value entries whose value is
null . |
IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_ZERO
Ignore JSON key-value entries whose value is zero.
|
SORT_JSON_OBJECT_ENTRY_KEYS
Sort keys of JSON key-value entries before updating.
|
Modifier and Type | Method and Description |
---|---|
static Digest.Feature |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Digest.Feature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_NULL
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'.
public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_FALSE
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'.
public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_ZERO
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'.
public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_STRING
If this feature is enabled, two JSONs below generate the same digest value.
{ "key1":"value1", "key2":"" } { "key1":"value1" }
The default value is 'disabled'.
public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_ARRAY
If this feature is enabled, two JSONs below generate the same digest value.
{ "key1":"value1", "key2":[] } { "key1":"value1" }
The default value is 'disabled'.
public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_OBJECT
If this feature is enabled, two JSONs below generate the same digest value.
{ "key1":"value1", "key2":{} } { "key1":"value1" }
The default value is 'disabled'.
public static final Digest.Feature SORT_JSON_OBJECT_ENTRY_KEYS
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'.
public static Digest.Feature[] values()
for (Digest.Feature c : Digest.Feature.values()) System.out.println(c);
public static Digest.Feature valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullCopyright © 2015. All rights reserved.