Modifier and Type | Method and Description |
---|---|
TreeGenerator |
createTreeGenerator()
Create a
JsonGenerator that will return a JsonNode when completed. |
static JsonNodeTreeCodec |
getInstance() |
JsonNode |
readTree(com.fasterxml.jackson.core.JsonParser p)
Read a json node from a stream.
|
com.fasterxml.jackson.core.JsonParser |
treeAsTokens(JsonNode node)
Create a new parser that traverses over the given json node.
|
JsonNodeTreeCodec |
withConfig(JsonStreamConfig config) |
void |
writeTree(com.fasterxml.jackson.core.JsonGenerator generator,
JsonNode tree)
Write a json node to a json stream.
|
public static JsonNodeTreeCodec getInstance()
JsonStreamConfig.DEFAULT
.public JsonNodeTreeCodec withConfig(JsonStreamConfig config)
config
- The stream config to use.public JsonNode readTree(com.fasterxml.jackson.core.JsonParser p) throws IOException
p
- The stream to parse.IOException
public void writeTree(com.fasterxml.jackson.core.JsonGenerator generator, JsonNode tree) throws IOException
generator
- The output json stream.tree
- The node to write.IOException
public com.fasterxml.jackson.core.JsonParser treeAsTokens(JsonNode node)
node
- The json node to traverse over.public TreeGenerator createTreeGenerator()
JsonGenerator
that will return a JsonNode
when completed.