|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.node.JsonNodeFactory
public class JsonNodeFactory
Base class that specifies methods for getting access to Node instances (newly constructed, or shared, depending on type), as well as basic implementation of the methods. Designed to be sub-classed if extended functionality (additions to behavior of node types, mostly) is needed.
Field Summary | |
---|---|
static JsonNodeFactory |
instance
Default singleton instance that construct "standard" node instances: given that this class is stateless, a globally shared singleton can be used. |
Constructor Summary | |
---|---|
protected |
JsonNodeFactory()
|
Method Summary | |
---|---|
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(BigDecimal v)
Factory method for getting an instance of Json numeric value that expresses given unlimited precision floating point value |
NumericNode |
numberNode(BigInteger v)
Factory method for getting an instance of Json numeric value that expresses given unlimited range integer 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 |
ObjectNode |
objectNode()
Factory method for constructing an empty Json Object ("struct") node |
POJONode |
POJONode(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(String text)
Factory method for constructing a node that represents Json String value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final JsonNodeFactory instance
Constructor Detail |
---|
protected JsonNodeFactory()
Method Detail |
---|
public BooleanNode booleanNode(boolean v)
public NullNode nullNode()
public NumericNode numberNode(byte v)
public NumericNode numberNode(short v)
public NumericNode numberNode(int v)
public NumericNode numberNode(long v)
public NumericNode numberNode(BigInteger v)
public NumericNode numberNode(float v)
public NumericNode numberNode(double v)
public NumericNode numberNode(BigDecimal v)
public TextNode textNode(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(Object pojo)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |