org.codehaus.jackson.map
Class TreeMapper

java.lang.Object
  extended by org.codehaus.jackson.node.JsonNodeFactory
      extended by org.codehaus.jackson.map.TreeMapper

Deprecated. since 1.0, use ObjectMapper instead

@Deprecated
public class TreeMapper
extends JsonNodeFactory

This mapper (or, codec) provides mapping between JSON, and Tree-like structure that consists of child-linked nodes that can be traversed with simple path operations (indexing arrays by element, objects by field name).

As of version 0.9.9 of Jackson, most functionality has been moved away from this class: all serialization and deserialization features are now accessible through either ObjectMapper or JsonParser and JsonGenerator. The remaining functionality is limited to JsonNodeFactory implementation which allows constructing typed JsonNode instances.


Field Summary
protected  ObjectMapper _objectMapper
          Deprecated. Mapper that handles actual serialization/deserialization
 
Fields inherited from class org.codehaus.jackson.node.JsonNodeFactory
instance
 
Constructor Summary
TreeMapper()
          Deprecated.  
TreeMapper(ObjectMapper m)
          Deprecated.  
 
Method Summary
 JsonFactory getJsonFactory()
          Deprecated. Method that can be used to get hold of JSON factory that this mapper uses if it needs to construct JSON parsers and/or generators.
protected  ObjectMapper objectMapper()
          Deprecated.  
 JsonNode readTree(byte[] jsonContent)
          Deprecated.  
 JsonNode readTree(File src)
          Deprecated.  
 JsonNode readTree(InputStream src)
          Deprecated.  
 JsonNode readTree(JsonParser jp)
          Deprecated. Method that will try to read a sub-tree using given parser, map it to a tree (represented by a root JsonNode) and return it, if possible.
 JsonNode readTree(Reader src)
          Deprecated.  
 JsonNode readTree(String jsonContent)
          Deprecated.  
 JsonNode readTree(URL src)
          Deprecated.  
 void writeTree(JsonNode rootNode, File dst)
          Deprecated.  
 void writeTree(JsonNode rootNode, OutputStream dst)
          Deprecated.  
 void writeTree(JsonNode rootNode, Writer dst)
          Deprecated.  
 
Methods inherited from class org.codehaus.jackson.node.JsonNodeFactory
arrayNode, binaryNode, binaryNode, booleanNode, nullNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, objectNode, POJONode, textNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_objectMapper

protected ObjectMapper _objectMapper
Deprecated. 
Mapper that handles actual serialization/deserialization

Constructor Detail

TreeMapper

public TreeMapper()
Deprecated. 

TreeMapper

public TreeMapper(ObjectMapper m)
Deprecated. 
Method Detail

getJsonFactory

public JsonFactory getJsonFactory()
Deprecated. 
Method that can be used to get hold of JSON factory that this mapper uses if it needs to construct JSON parsers and/or generators.

Returns:
JSON factory that this mapper uses when it needs to construct JSON parser and generators

readTree

public JsonNode readTree(JsonParser jp)
                  throws IOException,
                         JsonParseException
Deprecated. 
Method that will try to read a sub-tree using given parser, map it to a tree (represented by a root JsonNode) and return it, if possible. Alternatively, if no content is available, null is returned to signal end-of-content.

Throws:
IOException
JsonParseException

readTree

public JsonNode readTree(File src)
                  throws IOException,
                         JsonParseException
Deprecated. 
Throws:
IOException
JsonParseException

readTree

public JsonNode readTree(URL src)
                  throws IOException,
                         JsonParseException
Deprecated. 
Throws:
IOException
JsonParseException

readTree

public JsonNode readTree(InputStream src)
                  throws IOException,
                         JsonParseException
Deprecated. 
Throws:
IOException
JsonParseException

readTree

public JsonNode readTree(Reader src)
                  throws IOException,
                         JsonParseException
Deprecated. 
Throws:
IOException
JsonParseException

readTree

public JsonNode readTree(String jsonContent)
                  throws IOException,
                         JsonParseException
Deprecated. 
Throws:
IOException
JsonParseException

readTree

public JsonNode readTree(byte[] jsonContent)
                  throws IOException,
                         JsonParseException
Deprecated. 
Throws:
IOException
JsonParseException

writeTree

public void writeTree(JsonNode rootNode,
                      File dst)
               throws IOException,
                      JsonParseException
Deprecated. 
Throws:
IOException
JsonParseException

writeTree

public void writeTree(JsonNode rootNode,
                      Writer dst)
               throws IOException,
                      JsonParseException
Deprecated. 
Throws:
IOException
JsonParseException

writeTree

public void writeTree(JsonNode rootNode,
                      OutputStream dst)
               throws IOException,
                      JsonParseException
Deprecated. 
Throws:
IOException
JsonParseException

objectMapper

protected ObjectMapper objectMapper()
Deprecated.