Top Description Fields Constructors Methods
com.fasterxml.jackson.jr.stree

public Class JacksonJrsTreeCodec

extends TreeCodec
Class Inheritance
Imports
java.io.IOException, java.util.*, com.fasterxml.jackson.core.*, com.fasterxml.jackson.jr.ob.JSONObjectException

TreeCodec implementation that can build "simple", immutable (read-only) trees out of JSON: these are represented as subtypes of JrsValue ("Jrs" from "jackson JR Simple").

Field Summary

Modifier and TypeField and Description
protected boolean
protected final ObjectCodec
protected boolean
public static final JrsMissing

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
protected List<JrsValue>
protected Map<String, JrsValue>
_map()

public JrsBoolean

Returns:

Node instance for given boolean value
booleanNode
(boolean
Whether to create Boolean.TRUE or Boolean.FALSE node
state
)

Factory method for constructing node to represent Boolean values.

public JrsValue
public JrsValue
public JrsValue
private JrsValue
public JrsValue
public JrsNumber

Returns:

Node instance for given numeric value
numberNode
(Number
Numeric value for constructed node to contain
nr
)

Factory method for constructing node to represent String values.

public <T extends TreeNode> T
public void
setFailOnDuplicateKeys(boolean state)

public void
public JrsString

Returns:

Node instance for given text value
stringNode
(String
String value for constructed node to contain
text
)

Factory method for constructing node to represent String values.

public JsonParser
public void

Field Detail

_failOnDuplicateKeysback to summary
protected boolean _failOnDuplicateKeys
_objectCodecback to summary
protected final ObjectCodec _objectCodec
_useBigDecimalForDoubleback to summary
protected boolean _useBigDecimalForDouble
MISSINGback to summary
public static final JrsMissing MISSING

Constructor Detail

JacksonJrsTreeCodecback to summary
public JacksonJrsTreeCodec()
JacksonJrsTreeCodecback to summary
public JacksonJrsTreeCodec(ObjectCodec codec)

Method Detail

_listback to summary
protected List<JrsValue> _list()
_mapback to summary
protected Map<String, JrsValue> _map()
booleanNodeback to summary
public JrsBoolean booleanNode(boolean state)

Factory method for constructing node to represent Boolean values.

Parameters
state:boolean

Whether to create Boolean.TRUE or Boolean.FALSE node

Returns:JrsBoolean

Node instance for given boolean value

Since
2.8
createArrayNodeback to summary
public JrsValue createArrayNode()

Implements abstract com.fasterxml.jackson.core.TreeCodec.createArrayNode.

Annotations
@Override
createObjectNodeback to summary
public JrsValue createObjectNode()

Implements abstract com.fasterxml.jackson.core.TreeCodec.createObjectNode.

Annotations
@Override
missingNodeback to summary
public JrsValue missingNode()

Overrides com.fasterxml.jackson.core.TreeCodec.missingNode.

Returns:JrsValue

Doc from com.fasterxml.jackson.core.TreeCodec.missingNode.

Node that represents "missing" node during traversal: something referenced but that does not exist in content model

Annotations
@Override
nodeFromback to summary
private JrsValue nodeFrom(JsonParser p) throws IOException
nullNodeback to summary
public JrsValue nullNode()

Overrides com.fasterxml.jackson.core.TreeCodec.nullNode.

Returns:JrsValue

Doc from com.fasterxml.jackson.core.TreeCodec.nullNode.

Node that represents explicit null value in content

Annotations
@Override
numberNodeback to summary
public JrsNumber numberNode(Number nr)

Factory method for constructing node to represent String values.

Parameters
nr:Number

Numeric value for constructed node to contain

Returns:JrsNumber

Node instance for given numeric value

Since
2.8
readTreeback to summary
public <T extends TreeNode> T readTree(JsonParser p) throws IOException

Implements abstract com.fasterxml.jackson.core.TreeCodec.readTree.

Annotations
@SuppressWarnings:unchecked
@Override
setFailOnDuplicateKeysback to summary
public void setFailOnDuplicateKeys(boolean state)
setUseBigDecimalForDoubleback to summary
public void setUseBigDecimalForDouble(boolean state)
stringNodeback to summary
public JrsString stringNode(String text)

Factory method for constructing node to represent String values.

Parameters
text:String

String value for constructed node to contain

Returns:JrsString

Node instance for given text value

Since
2.8
treeAsTokensback to summary
public JsonParser treeAsTokens(TreeNode node)

Implements abstract com.fasterxml.jackson.core.TreeCodec.treeAsTokens.

Annotations
@Override
writeTreeback to summary
public void writeTree(JsonGenerator g, TreeNode treeNode) throws IOException

Implements abstract com.fasterxml.jackson.core.TreeCodec.writeTree.

Annotations
@Override