Note that behavior of "exact BigDecimal value" (aka
"strip trailing zeroes of BigDecimal or not") changed in 3.0:
new tools.
setting is used to externally configure this behavior.
Note, too, that this factory will no longer handle this normalization
(if enabled): caller (like tools.)
is expected to handle it.
| Modifier and Type | Field and Description |
|---|---|
| public static final JsonNodeFactory | instance
Default singleton instance that construct "standard" node instances: given that this class is stateless, a globally shared singleton can be used. |
| protected static final int | MAX_ELEMENT_INDEX_FOR_INSERT
Constant that defines maximum |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | |
| public ArrayNode | arrayNode()
Implements tools. Factory method for constructing an empty JSON Array node |
| public ArrayNode | arrayNode(int capacity)
Implements tools. Factory method for constructing a JSON Array node with an initial capacity |
| public BinaryNode | binaryNode(byte[] data)
Implements tools. Factory method for constructing a node that represents given binary data, and will get serialized as equivalent base64-encoded String value |
| public BinaryNode | binaryNode(byte[] data, int offset, int length)
Implements tools. Factory method for constructing a node that represents given binary data, and will get serialized as equivalent base64-encoded String value |
| public BooleanNode | booleanNode(boolean v)
Implements tools. Factory method for getting an instance of JSON boolean value (either literal 'true' or 'false') |
| public int | |
| public JsonNode | |
| public NullNode | nullNode()
Implements tools. Factory method for getting an instance of JSON null node (which represents literal null value) |
| public NumericNode | numberNode(byte v)
Implements tools. Factory method for getting an instance of JSON numeric value that expresses given 8-bit value |
| public ValueNode | numberNode(Byte value)
Implements tools. Alternate factory method that will handle wrapper value, which may be null. |
| public NumericNode | numberNode(short v)
Implements tools. Factory method for getting an instance of JSON numeric value that expresses given 16-bit integer value |
| public ValueNode | numberNode(Short value)
Implements tools. Alternate factory method that will handle wrapper value, which may be null. |
| public NumericNode | numberNode(int v)
Implements tools. Factory method for getting an instance of JSON numeric value that expresses given 32-bit integer value |
| public ValueNode | numberNode(Integer value)
Implements tools. Alternate factory method that will handle wrapper value, which may be null. |
| public NumericNode | numberNode(long v)
Implements tools. Factory method for getting an instance of JSON numeric value that expresses given 64-bit integer value |
| public ValueNode | numberNode(Long v)
Implements tools. Alternate factory method that will handle wrapper value, which may be null. |
| public ValueNode | numberNode(BigInteger v)
Implements tools. Factory method for getting an instance of JSON numeric value that expresses given unlimited range integer value |
| public NumericNode | numberNode(float v)
Implements tools. Factory method for getting an instance of JSON numeric value that expresses given 32-bit floating point value |
| public ValueNode | numberNode(Float value)
Implements tools. Alternate factory method that will handle wrapper value, which may be null. |
| public NumericNode | numberNode(double v)
Implements tools. Factory method for getting an instance of JSON numeric value that expresses given 64-bit floating point value |
| public ValueNode | numberNode(Double value)
Implements tools. Alternate factory method that will handle wrapper value, which may be null. |
| public ValueNode | numberNode(BigDecimal v)
Implements tools. Factory method for getting an instance of JSON numeric value that expresses given unlimited precision floating point value
Note that no normalization is performed here; caller may choose
to do that, based on
|
| public ObjectNode | objectNode()
Implements tools. Factory method for constructing an empty JSON Object ("struct") node |
| public ValueNode | pojoNode(Object pojo)
Implements tools. 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. |
| public ValueNode | rawValueNode(RawValue value)
Implements tools. Factory method to use for adding "raw values"; pre-encoded values that are included exactly as-is when node is serialized. |
| public StringNode | stringNode(String text)
Implements tools. Factory method for constructing a node that represents JSON String value |
| instance | back to summary |
|---|---|
| public static final JsonNodeFactory instance Default singleton instance that construct "standard" node instances: given that this class is stateless, a globally shared singleton can be used. Default for 3.x is to make no changes; no normalization by default. | |
| MAX_ELEMENT_INDEX_FOR_INSERT | back to summary |
|---|---|
| protected static final int MAX_ELEMENT_INDEX_FOR_INSERT Constant that defines maximum | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| JsonNodeFactory | back to summary |
|---|---|
| public JsonNodeFactory() Default constructor. | |
| _inIntRange | back to summary |
|---|---|
| protected boolean _inIntRange(long l) | |
| arrayNode | back to summary |
|---|---|
| public ArrayNode arrayNode() Implements tools. Factory method for constructing an empty JSON Array node
| |
| arrayNode | back to summary |
|---|---|
| public ArrayNode arrayNode(int capacity) Implements tools. Factory method for constructing a JSON Array node with an initial capacity
| |
| binaryNode | back to summary |
|---|---|
| public BinaryNode binaryNode(byte[] data) Implements tools. Factory method for constructing a node that represents given binary data, and will get serialized as equivalent base64-encoded String value
| |
| binaryNode | back to summary |
|---|---|
| public BinaryNode binaryNode(byte[] data, int offset, int length) Implements tools. Factory method for constructing a node that represents given binary data, and will get serialized as equivalent base64-encoded String value
| |
| booleanNode | back to summary |
|---|---|
| public BooleanNode booleanNode(boolean v) Implements tools. Factory method for getting an instance of JSON boolean value (either literal 'true' or 'false')
| |
| getMaxElementIndexForInsert | back to summary |
|---|---|
| public int getMaxElementIndexForInsert() | |
| missingNode | back to summary |
|---|---|
| public JsonNode missingNode() Implements tools.
| |
| nullNode | back to summary |
|---|---|
| public NullNode nullNode() Implements tools. Factory method for getting an instance of JSON null node (which represents literal null value)
| |
| numberNode | back to summary |
|---|---|
| public NumericNode numberNode(byte v) Implements tools. Factory method for getting an instance of JSON numeric value that expresses given 8-bit value
| |
| numberNode | back to summary |
|---|---|
| public ValueNode numberNode(Byte value) Implements tools. Alternate factory method that will handle wrapper value, which may
be null.
Due to possibility of null, returning type is not guaranteed to be
| |
| numberNode | back to summary |
|---|---|
| public NumericNode numberNode(short v) Implements tools. Factory method for getting an instance of JSON numeric value that expresses given 16-bit integer value
| |
| numberNode | back to summary |
|---|---|
| public ValueNode numberNode(Short value) Implements tools. Alternate factory method that will handle wrapper value, which may
be null.
Due to possibility of null, returning type is not guaranteed to be
| |
| numberNode | back to summary |
|---|---|
| public NumericNode numberNode(int v) Implements tools. Factory method for getting an instance of JSON numeric value that expresses given 32-bit integer value
| |
| numberNode | back to summary |
|---|---|
| public ValueNode numberNode(Integer value) Implements tools. Alternate factory method that will handle wrapper value, which may
be null.
Due to possibility of null, returning type is not guaranteed to be
| |
| numberNode | back to summary |
|---|---|
| public NumericNode numberNode(long v) Implements tools. Factory method for getting an instance of JSON numeric value that expresses given 64-bit integer value
| |
| numberNode | back to summary |
|---|---|
| public ValueNode numberNode(Long v) Implements tools. Alternate factory method that will handle wrapper value, which may be null.
Due to possibility of null, returning type is not guaranteed to be
| |
| numberNode | back to summary |
|---|---|
| public ValueNode numberNode(BigInteger v) Implements tools. Factory method for getting an instance of JSON numeric value that expresses given unlimited range integer value
| |
| numberNode | back to summary |
|---|---|
| public NumericNode numberNode(float v) Implements tools. Factory method for getting an instance of JSON numeric value that expresses given 32-bit floating point value
| |
| numberNode | back to summary |
|---|---|
| public ValueNode numberNode(Float value) Implements tools. Alternate factory method that will handle wrapper value, which may
be null.
Due to possibility of null, returning type is not guaranteed to be
| |
| numberNode | back to summary |
|---|---|
| public NumericNode numberNode(double v) Implements tools. Factory method for getting an instance of JSON numeric value that expresses given 64-bit floating point value
| |
| numberNode | back to summary |
|---|---|
| public ValueNode numberNode(Double value) Implements tools. Alternate factory method that will handle wrapper value, which may
be null.
Due to possibility of null, returning type is not guaranteed to be
| |
| numberNode | back to summary |
|---|---|
| public ValueNode numberNode(BigDecimal v) Implements tools. Factory method for getting an instance of JSON numeric value that expresses given unlimited precision floating point value
Note that no normalization is performed here; caller may choose
to do that, based on
| |
| objectNode | back to summary |
|---|---|
| public ObjectNode objectNode() Implements tools. Factory method for constructing an empty JSON Object ("struct") node
| |
| pojoNode | back to summary |
|---|---|
| public ValueNode pojoNode(Object pojo) Implements tools. 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.
| |
| rawValueNode | back to summary |
|---|---|
| public ValueNode rawValueNode(RawValue value) Implements tools. Doc from tools. Factory method to use for adding "raw values"; pre-encoded values that are included exactly as-is when node is serialized. This may be used, for example, to include fully serialized JSON sub-trees. Note that the concept may not work with all backends, and since no translation of any kinds is done it will not work when converting between data formats.
| |
| stringNode | back to summary |
|---|---|
| public StringNode stringNode(String text) Implements tools. Factory method for constructing a node that represents JSON String value
| |