Class PlaceholderEnabledJsonNodeFactory
- All Implemented Interfaces:
com.fasterxml.jackson.databind.node.JsonNodeCreator,Serializable
public class PlaceholderEnabledJsonNodeFactory
extends com.fasterxml.jackson.databind.node.JsonNodeFactory
JsonNodeFactory.
Each JSON text value is processed by the PropertyPlaceholderResolver before building a TextNode.
Inspired by
Spring Framework PropertyPlaceHolder and by
Jakarta Digester Substitution.- Author:
- Cyrille Le Clerc
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class com.fasterxml.jackson.databind.node.JsonNodeFactory
instance -
Constructor Summary
Constructors Constructor Description PlaceholderEnabledJsonNodeFactory()Default constructorPlaceholderEnabledJsonNodeFactory(boolean bigDecimalExact)Main constructor -
Method Summary
Methods inherited from class com.fasterxml.jackson.databind.node.JsonNodeFactory
_inIntRange, arrayNode, arrayNode, binaryNode, binaryNode, booleanNode, nullNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, objectNode, pojoNode, rawValueNode, withExactBigDecimals
-
Constructor Details
-
PlaceholderEnabledJsonNodeFactory
public PlaceholderEnabledJsonNodeFactory(boolean bigDecimalExact)Main constructorThe only argument to this constructor is a boolean telling whether
DecimalNodeinstances must be built with exact representations ofBigDecimalinstances.This has quite an influence since, for instance, a BigDecimal (and, therefore, a DecimalNode) constructed from input string
"1.0"and another constructed with input string"1.00"will not be equal, since their scale differs (1 in the first case, 2 in the second case).Note that setting the argument to
truedoes not guarantee a strict inequality between JSON representations: input texts"0.1"and"1e-1", for instance, yield two equivalent BigDecimal instances since they have the same scale (1).The no-arg constructor (and the default
JsonNodeFactory.instance) calls this constructor withfalseas an argument.- Parameters:
bigDecimalExact- see description- See Also:
BigDecimal
-
PlaceholderEnabledJsonNodeFactory
public PlaceholderEnabledJsonNodeFactory()Default constructorThis calls
PlaceholderEnabledJsonNodeFactory(boolean)withfalseas an argument.
-
-
Method Details
-
textNode
- Specified by:
textNodein interfacecom.fasterxml.jackson.databind.node.JsonNodeCreator- Overrides:
textNodein classcom.fasterxml.jackson.databind.node.JsonNodeFactory
-