Class TreeTraversingParser

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, Versioned

    public class TreeTraversingParser
    extends JsonParserMinimalBase
    Facade over JsonNode that implements JsonParser to allow accessing contents of JSON tree in alternate form (stream of tokens). Useful when a streaming source is expected by code, such as data binding functionality.
    Since:
    1.3
    Author:
    tatu
    • Field Detail

      • _nodeCursor

        protected org.codehaus.jackson.node.NodeCursor _nodeCursor
        Traversal context within tree
      • _nextToken

        protected JsonToken _nextToken
        Sometimes parser needs to buffer a single look-ahead token; if so, it'll be stored here. This is currently used for handling
      • _startContainer

        protected boolean _startContainer
        Flag needed to handle recursion into contents of child Array/Object nodes.
      • _closed

        protected boolean _closed
        Flag that indicates whether parser is closed or not. Gets set when parser is either closed by explicit call (close()) or when end-of-input is reached.
    • Constructor Detail

      • TreeTraversingParser

        public TreeTraversingParser​(JsonNode n)