|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TreeNode
Marker interface used to denote JSON Tree nodes, as far as
the core package knows them (which is very little): mostly
needed to allow ObjectCodec
to have some level
of interoperability.
All real functionality is within JsonNode
base class in mapper
package.
Note that in Jackson 1.x JsonNode
itself
was part of core package: Jackson 2.x refactored this
since conceptually Tree Model is part of mapper package,
and so part visible to core
package should
be minimized.
Method Summary | |
---|---|
JsonToken |
asToken()
Method that can be used for efficient type detection when using stream abstraction for traversing nodes. |
JsonParser.NumberType |
numberType()
If this node is a numeric type (as per #isNumber ),
returns native type that node uses to store the numeric value;
otherwise returns null. |
JsonParser |
traverse()
Method for constructing a JsonParser instance for
iterating over contents of the tree that this node is root of. |
Method Detail |
---|
JsonToken asToken()
JsonToken
that equivalent
stream event would produce (for most nodes there is just
one token but for structured/container types multiple)
JsonParser.NumberType numberType()
#isNumber
),
returns native type that node uses to store the numeric value;
otherwise returns null.
JsonParser traverse()
JsonParser
instance for
iterating over contents of the tree that this node is root of.
Functionally equivalent to first serializing tree using
ObjectCodec
and then re-parsing but
more efficient.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |