public static enum JsonNode.OverwriteMode extends Enum<JsonNode.OverwriteMode>
JsonNode.withObject(JsonPointer)
method overrides, to indicate which overwrites are acceptable if the
path pointer indicates has incompatible nodes (for example, instead
of Object node a Null node is encountered).
Overwrite means that the existing value is replaced with compatible type,
potentially losing existing values or even sub-trees.
Default value if NULLS
which only allows Null-value nodes
to be replaced but no other types.
Enum Constant and Description |
---|
ALL
Mode in which all incompatible node types may be replaced, including
Array and Object nodes where necessary.
|
NONE
Mode in which no values may be overwritten, not even
NullNode s;
only compatible paths may be traversed. |
NULLS
Mode in which explicit
NullNode s may be replaced but no other
node types. |
SCALARS
Mode in which all scalar value nodes may be replaced, but not
Array or Object nodes.
|
Modifier and Type | Method and Description |
---|---|
static JsonNode.OverwriteMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JsonNode.OverwriteMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonNode.OverwriteMode NONE
NullNode
s;
only compatible paths may be traversed.public static final JsonNode.OverwriteMode NULLS
NullNode
s may be replaced but no other
node types.public static final JsonNode.OverwriteMode SCALARS
public static final JsonNode.OverwriteMode ALL
public static JsonNode.OverwriteMode[] values()
for (JsonNode.OverwriteMode c : JsonNode.OverwriteMode.values()) System.out.println(c);
public static JsonNode.OverwriteMode 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 © 2008–2022 FasterXML. All rights reserved.