Package com.fasterxml.jackson.core.json
Class DupDetector
java.lang.Object
com.fasterxml.jackson.core.json.DupDetector
Helper class used if
JsonParser.Feature.STRICT_DUPLICATE_DETECTION
is enabled.
Optimized to try to limit memory usage and processing overhead for smallest
entries, but without adding trashing (immutable objects would achieve optimal
memory usage but lead to significant number of discarded temp objects for
scopes with large number of entries). Another consideration is trying to limit
actual number of compiled classes as it contributes significantly to overall
jar size (due to linkage etc).- Since:
- 2.3
-
Method Summary
Modifier and TypeMethodDescriptionchild()
boolean
Method called to check whether a newly encountered property name would be a duplicate within this context, and if not, update the state to remember having seen the property name for checking more property namesvoid
reset()
static DupDetector
static DupDetector
-
Method Details
-
rootDetector
-
rootDetector
-
child
-
reset
public void reset() -
findLocation
-
getSource
- Returns:
- Source object (parser / generator) used to construct this detector
- Since:
- 2.7
-
isDup
Method called to check whether a newly encountered property name would be a duplicate within this context, and if not, update the state to remember having seen the property name for checking more property names- Parameters:
name
- Property seen- Returns:
True
if the property had already been seen before in this context- Throws:
JsonParseException
- to report possible operation problem (default implementation never throws it)
-