public class JsonNodeFactory
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static JsonNodeFactory |
instance |
Default singleton instance that construct "standard" node instances:
given that this class is stateless, a globally shared singleton
can be used.
|
| Modifier | Constructor | Description |
|---|---|---|
protected |
JsonNodeFactory() |
| Modifier and Type | Method | Description |
|---|---|---|
ArrayNode |
arrayNode() |
Factory method for constructing an empty JSON Array node
|
BinaryNode |
binaryNode(byte[] data) |
Factory method for constructing a node that represents given
binary data, and will get serialized as equivalent base64-encoded
String value
|
BinaryNode |
binaryNode(byte[] data,
int offset,
int length) |
Factory method for constructing a node that represents given
binary data, and will get serialized as equivalent base64-encoded
String value
|
BooleanNode |
booleanNode(boolean v) |
Factory method for getting an instance of JSON boolean value
(either literal 'true' or 'false')
|
NullNode |
nullNode() |
Factory method for getting an instance of JSON null node (which
represents literal null value)
|
NumericNode |
numberNode(byte v) |
Factory method for getting an instance of JSON numeric value
that expresses given 8-bit value
|
NumericNode |
numberNode(double v) |
Factory method for getting an instance of JSON numeric value
that expresses given 64-bit floating point value
|
NumericNode |
numberNode(float v) |
Factory method for getting an instance of JSON numeric value
that expresses given 32-bit floating point value
|
NumericNode |
numberNode(int v) |
Factory method for getting an instance of JSON numeric value
that expresses given 32-bit integer value
|
NumericNode |
numberNode(long v) |
Factory method for getting an instance of JSON numeric value
that expresses given 64-bit integer value
|
NumericNode |
numberNode(short v) |
Factory method for getting an instance of JSON numeric value
that expresses given 16-bit integer value
|
ValueNode |
numberNode(java.lang.Byte value) |
Alternate factory method that will handle wrapper value, which may
be null.
|
ValueNode |
numberNode(java.lang.Double value) |
Alternate factory method that will handle wrapper value, which may
be null.
|
ValueNode |
numberNode(java.lang.Float value) |
Alternate factory method that will handle wrapper value, which may
be null.
|
ValueNode |
numberNode(java.lang.Integer value) |
Alternate factory method that will handle wrapper value, which may
be null.
|
ValueNode |
numberNode(java.lang.Long value) |
Alternate factory method that will handle wrapper value, which may
be null.
|
ValueNode |
numberNode(java.lang.Short value) |
Alternate factory method that will handle wrapper value, which may
be null.
|
NumericNode |
numberNode(java.math.BigDecimal v) |
Factory method for getting an instance of JSON numeric value
that expresses given unlimited precision floating point value
|
NumericNode |
numberNode(java.math.BigInteger v) |
Factory method for getting an instance of JSON numeric value
that expresses given unlimited range integer value
|
ObjectNode |
objectNode() |
Factory method for constructing an empty JSON Object ("struct") node
|
POJONode |
POJONode(java.lang.Object pojo) |
Factory method for constructing a wrapper for POJO
("Plain Old Java Object") objects; these will get serialized
using data binding, usually as JSON Objects, but in some
cases as JSON Strings or other node types.
|
TextNode |
textNode(java.lang.String text) |
Factory method for constructing a node that represents JSON
String value
|
public static final JsonNodeFactory instance
public BooleanNode booleanNode(boolean v)
public NullNode nullNode()
public NumericNode numberNode(byte v)
public ValueNode numberNode(java.lang.Byte value)
NumericNode, but just ValueNode.public NumericNode numberNode(short v)
public ValueNode numberNode(java.lang.Short value)
NumericNode, but just ValueNode.public NumericNode numberNode(int v)
public ValueNode numberNode(java.lang.Integer value)
NumericNode, but just ValueNode.public NumericNode numberNode(long v)
public ValueNode numberNode(java.lang.Long value)
NumericNode, but just ValueNode.public NumericNode numberNode(java.math.BigInteger v)
public NumericNode numberNode(float v)
public ValueNode numberNode(java.lang.Float value)
NumericNode, but just ValueNode.public NumericNode numberNode(double v)
public ValueNode numberNode(java.lang.Double value)
NumericNode, but just ValueNode.public NumericNode numberNode(java.math.BigDecimal v)
public TextNode textNode(java.lang.String text)
public BinaryNode binaryNode(byte[] data)
public BinaryNode binaryNode(byte[] data, int offset, int length)
public ArrayNode arrayNode()
public ObjectNode objectNode()
public POJONode POJONode(java.lang.Object pojo)