public enum NodeType extends java.lang.Enum<NodeType>
In addition to what the JSON RFC defines, JSON Schema has an integer
type, which is a numeric value without any fraction or exponent
part.
NOTE: will disappear in Jackson 2.2.x, which has an equivalent enumeration
Enum Constant and Description |
---|
ARRAY
Array nodes
|
BOOLEAN
Boolean nodes
|
INTEGER
Integer nodes
|
NULL
Number nodes (ie, decimal numbers)
|
NUMBER
Object nodes
|
OBJECT
Null nodes
|
STRING
String nodes
|
Modifier and Type | Method and Description |
---|---|
static NodeType |
fromName(java.lang.String name)
Given a type name, return the corresponding node type
|
static NodeType |
getNodeType(com.fasterxml.jackson.databind.JsonNode node)
Given a
JsonNode as an argument, return its type. |
java.lang.String |
toString() |
static NodeType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static NodeType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NodeType ARRAY
public static final NodeType BOOLEAN
public static final NodeType INTEGER
public static final NodeType NULL
public static final NodeType NUMBER
public static final NodeType OBJECT
public static final NodeType STRING
public static NodeType[] values()
for (NodeType c : NodeType.values()) System.out.println(c);
public static NodeType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<NodeType>
public static NodeType fromName(java.lang.String name)
name
- the type namepublic static NodeType getNodeType(com.fasterxml.jackson.databind.JsonNode node)
JsonNode
as an argument, return its type. The argument
MUST NOT BE NULL, and MUST NOT be a MissingNode
node
- the node to determine the type of