|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.jackson.JsonNode
org.codehaus.jackson.node.BaseJsonNode
org.codehaus.jackson.node.ValueNode
org.codehaus.jackson.node.TextNode
public final class TextNode
Value node that contains a text value.
| Constructor Summary | |
|---|---|
TextNode(java.lang.String v)
|
|
| Method Summary | |
|---|---|
protected static void |
appendQuoted(java.lang.StringBuilder sb,
java.lang.String content)
|
boolean |
equals(java.lang.Object o)
Note: marked as abstract to ensure all implementation classes define it properly. |
java.lang.String |
getTextValue()
Method to use for accessing String values (list values, Object field values, root-level values). |
java.lang.String |
getValueAsText()
Method that will return valid String representation of the container value, if the node is a value node (method JsonNode.isValueNode() returns true), otherwise null. |
int |
hashCode()
|
boolean |
isTextual()
|
void |
serialize(JsonGenerator jg,
SerializerProvider provider)
|
java.lang.String |
toString()
Different from other values, Strings need quoting |
static TextNode |
valueOf(java.lang.String v)
Factory method that should be used to construct instances. |
| Methods inherited from class org.codehaus.jackson.node.ValueNode |
|---|
isValueNode, path, path |
| Methods inherited from class org.codehaus.jackson.node.BaseJsonNode |
|---|
writeTo |
| Methods inherited from class org.codehaus.jackson.JsonNode |
|---|
get, get, getBigIntegerValue, getBinaryValue, getBooleanValue, getDecimalValue, getDoubleValue, getElements, getElementValue, getFieldNames, getFieldValue, getIntValue, getLongValue, getNumberValue, getPath, getPath, isArray, isBigDecimal, isBigInteger, isBinary, isBoolean, isContainerNode, isDouble, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isObject, isPojo, iterator, size |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TextNode(java.lang.String v)
| Method Detail |
|---|
public static TextNode valueOf(java.lang.String v)
TextNode object, if v
is NOT null; null if it is.public boolean isTextual()
isTextual in class JsonNodepublic java.lang.String getTextValue()
JsonNodeJsonNode.isTextual() returns
false) null will be returned.
For String values, null is never returned; empty Strings are returned
as is.
getTextValue in class JsonNodepublic java.lang.String getValueAsText()
JsonNodeJsonNode.isValueNode() returns true), otherwise null.
Note: to serialize nodes of any type, you should call
JsonNode.toString() instead.
getValueAsText in class JsonNode
public final void serialize(JsonGenerator jg,
SerializerProvider provider)
throws java.io.IOException,
JsonProcessingException
serialize in interface JsonSerializableserialize in class BaseJsonNodejava.io.IOException
JsonProcessingExceptionpublic boolean equals(java.lang.Object o)
JsonNodeNote: marked as abstract to ensure all implementation classes define it properly.
equals in class JsonNodepublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class ValueNode
protected static void appendQuoted(java.lang.StringBuilder sb,
java.lang.String content)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||