Top Description Fields Constructors Methods
tools.jackson.core.filter

public Class FilteringParserDelegate

extends JsonParserDelegate
Class Inheritance
Imports
tools.jackson.core.*, tools.jackson.core.filter.TokenFilter.Inclusion, tools.jackson.core.sym.PropertyNameMatcher, tools.jackson.core.util.JsonParserDelegate

Specialized JsonParserDelegate that allows use of TokenFilter for outputting a subset of content that is visible to caller

Field Summary

Modifier and TypeField and Description
protected boolean
_allowMultipleMatches

Flag that determines whether filtering will continue after the first match is indicated or not: if `false`, output is based on just the first full match (returning TokenFilter#INCLUDE_ALL) and no more checks are made; if `true` then filtering will be applied as necessary until end of content.

protected JsonToken
_currToken

Last token retrieved via nextToken, if any.

protected TokenFilterContext
_exposedContext

In cases where _headContext is "ahead" of context exposed to caller, this context points to what is currently exposed to caller.

protected TokenFilterContext
_headContext

During traversal this is the actual "open" parse tree, which sometimes is the same as _exposedContext, and at other times is ahead of it.

protected TokenFilter.Inclusion
_inclusion

Flag that determines whether path leading up to included content should also be automatically included or not.

protected TokenFilter
_itemFilter

State that applies to the item within container, used where applicable.

protected JsonToken
_lastClearedToken

Last cleared token, if any: that is, value that was in effect when clearCurrentToken was called.

protected int
_matchCount

Number of tokens for which TokenFilter#INCLUDE_ALL has been returned.

protected TokenFilter
rootFilter

Object consulted to determine whether to write parts of content generator is asked to write or not.

Inherited from tools.jackson.core.util.JsonParserDelegate:
delegate

Constructor Summary

AccessConstructor and Description
public
FilteringParserDelegate(JsonParser
Parser to delegate calls to
p
,
TokenFilter
Filter to use
f
,
TokenFilter.Inclusion
Definition of inclusion criteria
inclusion
,
boolean
Whether to allow multiple matches
allowMultipleMatches
)

public
FilteringParserDelegate(JsonParser
Parser to delegate calls to
p
,
TokenFilter
Filter to use
f
,
TokenFilter.Inclusion
Definition of inclusion criteria
inclusion
,
boolean
Whether to allow multiple matches
allowMultipleMatches
,
boolean
If true, allows use of NonBlockingJsonParser: must also feed all input to parser before calling nextToken on this delegate
allowNonBlockingParser
)

Method Summary

Modifier and TypeMethod and Description
private static void
protected TokenStreamContext
private JsonToken
protected final JsonToken
protected final JsonToken
private final boolean
public void
clearCurrentToken()

Overrides tools.jackson.core.util.JsonParserDelegate.clearCurrentToken.

Method called to "consume" the current token by effectively removing it so that hasCurrentToken returns false, and currentToken null).

public TokenStreamLocation
currentLocation()

Overrides tools.jackson.core.util.JsonParserDelegate.currentLocation.

Method that returns location of the last processed character; usually for error reporting purposes.

public String
currentName()

Overrides tools.jackson.core.util.JsonParserDelegate.currentName.

Method that can be called to get the name associated with the current token: for JsonToken#PROPERTY_NAMEs it will be the same as what getString() returns; for Object property values it will be the preceding property name; and for others (array element, root-level values) null.

public JsonToken
currentToken()

Overrides tools.jackson.core.util.JsonParserDelegate.currentToken.

Accessor to find which token parser currently points to, if any; null will be returned if none.

public final int
currentTokenId()

Overrides tools.jackson.core.util.JsonParserDelegate.currentTokenId.

Method similar to currentToken() but that returns an int instead of JsonToken (enum value).

public TokenFilter
public JsonToken
getLastClearedToken()

Overrides tools.jackson.core.util.JsonParserDelegate.getLastClearedToken.

Method that can be called to get the last token that was cleared using clearCurrentToken.

public int

Returns:

Number of matches
getMatchCount
()

Accessor for finding number of matches, where specific token and sub-tree starting (if structured type) are passed.

public String
getString()

Overrides tools.jackson.core.util.JsonParserDelegate.getString.

Method for accessing textual representation of the current token; if no current token (before first call to nextToken, or after encountering end-of-input), returns null.

public char[]
getStringCharacters()

Overrides tools.jackson.core.util.JsonParserDelegate.getStringCharacters.

Method similar to getString(), but that will return underlying (unmodifiable) character array that contains textual value, instead of constructing a String object to contain this information.

public int
getStringLength()

Overrides tools.jackson.core.util.JsonParserDelegate.getStringLength.

Accessor used with getStringCharacters, to know length of String stored in returned buffer.

public int
getStringOffset()

Overrides tools.jackson.core.util.JsonParserDelegate.getStringOffset.

Accessor used with getStringCharacters, to know offset of the first text content character within buffer.

public String
getValueAsString()

Overrides tools.jackson.core.util.JsonParserDelegate.getValueAsString.

Method that will try to convert value of current token to a java.lang.String.

public String
getValueAsString(String defaultValue)

Overrides tools.jackson.core.util.JsonParserDelegate.getValueAsString.

Method that will try to convert value of current token to a java.lang.String.

public boolean
hasCurrentToken()

Overrides tools.jackson.core.util.JsonParserDelegate.hasCurrentToken.

Method for checking whether parser currently points to a token (and data for that token is available).

public boolean
hasStringCharacters()

Overrides tools.jackson.core.util.JsonParserDelegate.hasStringCharacters.

Method that can be used to determine whether calling of getStringCharacters would be the most efficient way to access String value for the event parser currently points to (compared to getString()).

public final boolean
hasToken(JsonToken t)

Overrides tools.jackson.core.util.JsonParserDelegate.hasToken.

Method that is functionally equivalent to: return currentToken() == t but may be more efficiently implemented.

public boolean
hasTokenId(int id)

Overrides tools.jackson.core.util.JsonParserDelegate.hasTokenId.

Method that is functionally equivalent to: return currentTokenId() == id but may be more efficiently implemented.

private void
initializeFilters(TokenFilter
Filter to use
f
,
TokenFilter.Inclusion
Definition of inclusion criteria
inclusion
,
boolean
Whether to allow multiple matches
allowMultipleMatches
)

Initializes filter-related fields

public boolean
isExpectedStartArrayToken()

Overrides tools.jackson.core.util.JsonParserDelegate.isExpectedStartArrayToken.

Specialized accessor that can be used to verify that the current token indicates start array (usually meaning that current token is JsonToken#START_ARRAY) when start array is expected.

public boolean
public String
nextName()

Overrides tools.jackson.core.util.JsonParserDelegate.nextName.

Method that fetches next token (as if calling nextToken) and verifies whether it is JsonToken#PROPERTY_NAME; if it is, returns same as currentName(), otherwise null.

public boolean
nextName(SerializableString str)

Overrides tools.jackson.core.util.JsonParserDelegate.nextName.

Method that fetches next token (as if calling nextToken) and verifies whether it is JsonToken#PROPERTY_NAME with specified name and returns result of that comparison.

public int
nextNameMatch(PropertyNameMatcher matcher)

Overrides tools.jackson.core.util.JsonParserDelegate.nextNameMatch.

Method that tries to match next token from stream as JsonToken#PROPERTY_NAME, and if so, further match it to one of pre-specified (field) names.

public JsonToken
nextToken()

Overrides tools.jackson.core.util.JsonParserDelegate.nextToken.

Main iteration method, which will advance stream enough to determine type of the next token, if any.

public JsonToken
nextValue()

Overrides tools.jackson.core.util.JsonParserDelegate.nextValue.

Iteration method that will advance stream enough to determine type of the next token that is a value type (including JSON Array and Object start/end markers).

public JsonParser
skipChildren()

Overrides tools.jackson.core.util.JsonParserDelegate.skipChildren.

Need to override, re-implement similar to how method defined in tools.jackson.core.base.ParserMinimalBase, to keep state correct here.

public TokenStreamContext
streamReadContext()

Overrides tools.jackson.core.util.JsonParserDelegate.streamReadContext.

Method that can be used to access current parsing context reader is in. There are 3 different types: root, array and object contexts, with slightly different available information.

Inherited from tools.jackson.core.util.JsonParserDelegate:
assignCurrentValuecanParseAsynccanReadObjectIdcanReadTypeIdclosecurrentNameMatchcurrentTokenCountcurrentTokenLocationcurrentValuedelegatefinishTokengetBigIntegerValuegetBinaryValuegetBooleanValuegetByteValuegetDecimalValuegetDoubleValuegetEmbeddedObjectgetFloatValuegetIntValuegetLongValuegetNumberTypegetNumberTypeFPgetNumberValuegetNumberValueDeferredgetNumberValueExactgetObjectIdgetSchemagetShortValuegetStringgetTypeIdgetValueAsBooleangetValueAsBooleangetValueAsDoublegetValueAsDoublegetValueAsIntgetValueAsIntgetValueAsLonggetValueAsLongisClosedisEnabledisExpectedNumberIntTokenisNaNnonBlockingInputFeederobjectReadContextreadBinaryValuereadValueAsreadValueAsreadValueAsreadValueAsTreestreamReadCapabilitiesstreamReadConstraintsstreamReadFeaturesstreamReadInputSourceversion

Field Detail

_allowMultipleMatchesback to summary
protected boolean _allowMultipleMatches

Flag that determines whether filtering will continue after the first match is indicated or not: if `false`, output is based on just the first full match (returning TokenFilter#INCLUDE_ALL) and no more checks are made; if `true` then filtering will be applied as necessary until end of content.

_currTokenback to summary
protected JsonToken _currToken

Last token retrieved via nextToken, if any. Null before the first call to nextToken(), as well as if token has been explicitly cleared

_exposedContextback to summary
protected TokenFilterContext _exposedContext

In cases where _headContext is "ahead" of context exposed to caller, this context points to what is currently exposed to caller. When the two are in sync, this context reference will be null.

_headContextback to summary
protected TokenFilterContext _headContext

During traversal this is the actual "open" parse tree, which sometimes is the same as _exposedContext, and at other times is ahead of it. Note that this context is never null.

_inclusionback to summary
protected TokenFilter.Inclusion _inclusion

Flag that determines whether path leading up to included content should also be automatically included or not. If `false`, no path inclusion is done and only explicitly included entries are output; if `true` then path from main level down to match is also included as necessary.

_itemFilterback to summary
protected TokenFilter _itemFilter

State that applies to the item within container, used where applicable. Specifically used to pass inclusion state between property name and property, and also used for array elements.

_lastClearedTokenback to summary
protected JsonToken _lastClearedToken

Last cleared token, if any: that is, value that was in effect when clearCurrentToken was called.

_matchCountback to summary
protected int _matchCount

Number of tokens for which TokenFilter#INCLUDE_ALL has been returned.

rootFilterback to summary
protected TokenFilter rootFilter

Object consulted to determine whether to write parts of content generator is asked to write or not.

Constructor Detail

FilteringParserDelegateback to summary
public FilteringParserDelegate(JsonParser p, TokenFilter f, TokenFilter.Inclusion inclusion, boolean allowMultipleMatches)
Parameters
p:JsonParser

Parser to delegate calls to

f:TokenFilter

Filter to use

inclusion:TokenFilter.Inclusion

Definition of inclusion criteria

allowMultipleMatches:boolean

Whether to allow multiple matches

Exceptions
IllegalArgumentException:
if non-blocking (async) parser (for which parser.canParseAsync() returns `true`) is used -- doing so requires use of different constructor: FilteringParserDelegate(JsonParser, TokenFilter, TokenFilter.Inclusion, boolean, boolean)
FilteringParserDelegateback to summary
public FilteringParserDelegate(JsonParser p, TokenFilter f, TokenFilter.Inclusion inclusion, boolean allowMultipleMatches, boolean allowNonBlockingParser)
Parameters
p:JsonParser

Parser to delegate calls to

f:TokenFilter

Filter to use

inclusion:TokenFilter.Inclusion

Definition of inclusion criteria

allowMultipleMatches:boolean

Whether to allow multiple matches

allowNonBlockingParser:boolean

If true, allows use of NonBlockingJsonParser: must also feed all input to parser before calling nextToken on this delegate

Exceptions
IllegalArgumentException:
if NonBlockingJsonParser is used without explicit permission

Method Detail

_checkAsyncParserback to summary
private static void _checkAsyncParser(JsonParser p) throws IllegalArgumentException
_filterContextback to summary
protected TokenStreamContext _filterContext()
_nextBufferedback to summary
private JsonToken _nextBuffered(TokenFilterContext buffRoot) throws JacksonException
_nextToken2back to summary
protected final JsonToken _nextToken2() throws JacksonException
_nextTokenWithBufferingback to summary
protected final JsonToken _nextTokenWithBuffering(final TokenFilterContext buffRoot) throws JacksonException
_verifyAllowedMatchesback to summary
private final boolean _verifyAllowedMatches() throws JacksonException
clearCurrentTokenback to summary
public void clearCurrentToken()

Overrides tools.jackson.core.util.JsonParserDelegate.clearCurrentToken.

Doc from tools.jackson.core.JsonParser.clearCurrentToken.

Method called to "consume" the current token by effectively removing it so that hasCurrentToken returns false, and currentToken null). Cleared token value can still be accessed by calling getLastClearedToken (if absolutely needed), but usually isn't.

Method was added to be used by the optional data binder, since it has to be able to consume last token used for binding (so that it will not be used again).

Annotations
@Override
currentLocationback to summary
public TokenStreamLocation currentLocation()

Overrides tools.jackson.core.util.JsonParserDelegate.currentLocation.

Doc from tools.jackson.core.JsonParser.currentLocation.

Method that returns location of the last processed character; usually for error reporting purposes.

Note that the location is not guaranteed to be accurate (although most implementation will try their best): some implementations may only report specific boundary locations (start or end locations of tokens) and others only return TokenStreamLocation#NA due to not having access to input location information (when delegating actual decoding work to other library).

Annotations
@Override
currentNameback to summary
public String currentName()

Overrides tools.jackson.core.util.JsonParserDelegate.currentName.

Doc from tools.jackson.core.JsonParser.currentName.

Method that can be called to get the name associated with the current token: for JsonToken#PROPERTY_NAMEs it will be the same as what getString() returns; for Object property values it will be the preceding property name; and for others (array element, root-level values) null.

Annotations
@Override
currentTokenback to summary
public JsonToken currentToken()

Overrides tools.jackson.core.util.JsonParserDelegate.currentToken.

Doc from tools.jackson.core.JsonParser.currentToken.

Accessor to find which token parser currently points to, if any; null will be returned if none. If return value is non-null, data associated with the token is available via other accessor methods.

Annotations
@Override
currentTokenIdback to summary
public final int currentTokenId()

Overrides tools.jackson.core.util.JsonParserDelegate.currentTokenId.

Doc from tools.jackson.core.JsonParser.currentTokenId.

Method similar to currentToken() but that returns an int instead of JsonToken (enum value).

Use of int directly is typically more efficient on switch statements, so this method may be useful when building low-overhead codecs. Note, however, that effect may not be big enough to matter: make sure to profile performance before deciding to use this method.

Annotations
@Override
getFilterback to summary
public TokenFilter getFilter()
getLastClearedTokenback to summary
public JsonToken getLastClearedToken()

Overrides tools.jackson.core.util.JsonParserDelegate.getLastClearedToken.

Doc from tools.jackson.core.JsonParser.getLastClearedToken.

Method that can be called to get the last token that was cleared using clearCurrentToken. This is not necessarily the latest token read. Will return null if no tokens have been cleared, or if parser has been closed.

Annotations
@Override
getMatchCountback to summary
public int getMatchCount()

Accessor for finding number of matches, where specific token and sub-tree starting (if structured type) are passed.

Returns:int

Number of matches

getStringback to summary
public String getString() throws JacksonException

Overrides tools.jackson.core.util.JsonParserDelegate.getString.

Doc from tools.jackson.core.JsonParser.getString.

Method for accessing textual representation of the current token; if no current token (before first call to nextToken, or after encountering end-of-input), returns null. Method can be called for any token type.

Annotations
@Override
getStringCharactersback to summary
public char[] getStringCharacters() throws JacksonException

Overrides tools.jackson.core.util.JsonParserDelegate.getStringCharacters.

Doc from tools.jackson.core.JsonParser.getStringCharacters.

Method similar to getString(), but that will return underlying (unmodifiable) character array that contains textual value, instead of constructing a String object to contain this information. Note, however, that:

  • String contents are not guaranteed to start at index 0 (rather, call getStringOffset) to know the actual offset
  • Length of string contents may be less than the length of returned buffer: call getStringLength for actual length of returned content.

Note that caller MUST NOT modify the returned character array in any way -- doing so may corrupt current parser state and render parser instance useless.

The only reason to call this method (over getString()) is to avoid construction of a String object (which will make a copy of contents).

Annotations
@Override
getStringLengthback to summary
public int getStringLength() throws JacksonException

Overrides tools.jackson.core.util.JsonParserDelegate.getStringLength.

Doc from tools.jackson.core.JsonParser.getStringLength.

Accessor used with getStringCharacters, to know length of String stored in returned buffer.

Annotations
@Override
getStringOffsetback to summary
public int getStringOffset() throws JacksonException

Overrides tools.jackson.core.util.JsonParserDelegate.getStringOffset.

Doc from tools.jackson.core.JsonParser.getStringOffset.

Accessor used with getStringCharacters, to know offset of the first text content character within buffer.

Annotations
@Override
getValueAsStringback to summary
public String getValueAsString() throws JacksonException

Overrides tools.jackson.core.util.JsonParserDelegate.getValueAsString.

Doc from tools.jackson.core.JsonParser.getValueAsString.

Method that will try to convert value of current token to a java.lang.String. JSON Strings map naturally; scalar values get converted to their textual representation. If representation cannot be converted to a String value (including structured types like Objects and Arrays and null token), default value of null will be returned; no exceptions are thrown.

Annotations
@Override
getValueAsStringback to summary
public String getValueAsString(String defaultValue) throws JacksonException

Overrides tools.jackson.core.util.JsonParserDelegate.getValueAsString.

Doc from tools.jackson.core.JsonParser.getValueAsString.

Method that will try to convert value of current token to a java.lang.String. JSON Strings map naturally; scalar values get converted to their textual representation. If representation cannot be converted to a String value (including structured types like Objects and Arrays and null token), specified default value will be returned; no exceptions are thrown.

Annotations
@Override
hasCurrentTokenback to summary
public boolean hasCurrentToken()

Overrides tools.jackson.core.util.JsonParserDelegate.hasCurrentToken.

Doc from tools.jackson.core.JsonParser.hasCurrentToken.

Method for checking whether parser currently points to a token (and data for that token is available). Equivalent to check for parser.getCurrentToken() != null.

Annotations
@Override
hasStringCharactersback to summary
public boolean hasStringCharacters()

Overrides tools.jackson.core.util.JsonParserDelegate.hasStringCharacters.

Doc from tools.jackson.core.JsonParser.hasStringCharacters.

Method that can be used to determine whether calling of getStringCharacters would be the most efficient way to access String value for the event parser currently points to (compared to getString()).

Annotations
@Override
hasTokenback to summary
public final boolean hasToken(JsonToken t)

Overrides tools.jackson.core.util.JsonParserDelegate.hasToken.

Doc from tools.jackson.core.JsonParser.hasToken.

Method that is functionally equivalent to: return currentToken() == t but may be more efficiently implemented.

Note that no traversal or conversion is performed; so in some cases calling method like isExpectedStartArrayToken() is necessary instead.

Annotations
@Override
hasTokenIdback to summary
public boolean hasTokenId(int id)

Overrides tools.jackson.core.util.JsonParserDelegate.hasTokenId.

Doc from tools.jackson.core.JsonParser.hasTokenId.

Method that is functionally equivalent to: return currentTokenId() == id but may be more efficiently implemented.

Note that no traversal or conversion is performed; so in some cases calling method like isExpectedStartArrayToken() is necessary instead.

Annotations
@Override
initializeFiltersback to summary
private void initializeFilters(TokenFilter f, TokenFilter.Inclusion inclusion, boolean allowMultipleMatches)

Initializes filter-related fields

Parameters
f:TokenFilter

Filter to use

inclusion:TokenFilter.Inclusion

Definition of inclusion criteria

allowMultipleMatches:boolean

Whether to allow multiple matches

isExpectedStartArrayTokenback to summary
public boolean isExpectedStartArrayToken()

Overrides tools.jackson.core.util.JsonParserDelegate.isExpectedStartArrayToken.

Doc from tools.jackson.core.JsonParser.isExpectedStartArrayToken.

Specialized accessor that can be used to verify that the current token indicates start array (usually meaning that current token is JsonToken#START_ARRAY) when start array is expected. For some specialized parsers this can return true for other cases as well; this is usually done to emulate arrays in cases underlying format is ambiguous (XML, for example, has no format-level difference between Objects and Arrays; it just has elements).

Default implementation is equivalent to:

   currentToken() == JsonToken.START_ARRAY
but may be overridden by custom parser implementations.
Annotations
@Override
isExpectedStartObjectTokenback to summary
public boolean isExpectedStartObjectToken()

Overrides tools.jackson.core.util.JsonParserDelegate.isExpectedStartObjectToken.

Doc from tools.jackson.core.JsonParser.isExpectedStartObjectToken.

Similar to isExpectedStartArrayToken(), but checks whether stream currently points to JsonToken#START_OBJECT.

Annotations
@Override
nextNameback to summary
public String nextName() throws JacksonException

Overrides tools.jackson.core.util.JsonParserDelegate.nextName.

Doc from tools.jackson.core.JsonParser.nextName.

Method that fetches next token (as if calling nextToken) and verifies whether it is JsonToken#PROPERTY_NAME; if it is, returns same as currentName(), otherwise null.

Note

in Jackson 2.x method was called nextFieldName()

Annotations
@Override
Exceptions
JacksonException:
for low-level read issues
nextNameback to summary
public boolean nextName(SerializableString str) throws JacksonException

Overrides tools.jackson.core.util.JsonParserDelegate.nextName.

Doc from tools.jackson.core.JsonParser.nextName.

Method that fetches next token (as if calling nextToken) and verifies whether it is JsonToken#PROPERTY_NAME with specified name and returns result of that comparison. It is functionally equivalent to:

  return (nextToken() == JsonToken.PROPERTY_NAME) && str.getValue().equals(currentName());
but may be faster for parser to verify, and can therefore be used if caller expects to get such a property name from input next.

Note

in Jackson 2.x method was called nextFieldName()

Annotations
@Override
Exceptions
JacksonException:
for low-level read issues
nextNameMatchback to summary
public int nextNameMatch(PropertyNameMatcher matcher) throws JacksonException

Overrides tools.jackson.core.util.JsonParserDelegate.nextNameMatch.

Doc from tools.jackson.core.JsonParser.nextNameMatch.

Method that tries to match next token from stream as JsonToken#PROPERTY_NAME, and if so, further match it to one of pre-specified (field) names. If match succeeds, property index (non-negative `int`) is returned; otherwise one of marker constants from PropertyNameMatcher.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken() throws JacksonException

Overrides tools.jackson.core.util.JsonParserDelegate.nextToken.

Doc from tools.jackson.core.JsonParser.nextToken.

Main iteration method, which will advance stream enough to determine type of the next token, if any. If none remaining (stream has no content other than possible white space before ending), null will be returned.

Annotations
@Override
Exceptions
JacksonException:
for low-level read issues
nextValueback to summary
public JsonToken nextValue() throws JacksonException

Overrides tools.jackson.core.util.JsonParserDelegate.nextValue.

Doc from tools.jackson.core.JsonParser.nextValue.

Iteration method that will advance stream enough to determine type of the next token that is a value type (including JSON Array and Object start/end markers). Or put another way, nextToken() will be called once, and if JsonToken#PROPERTY_NAME is returned, another time to get the value of the property. Method is most useful for iterating over value entries of JSON objects; Object property name will still be available by calling currentName when parser points to the value.

Annotations
@Override
Exceptions
JacksonException:
for low-level read issues
skipChildrenback to summary
public JsonParser skipChildren() throws JacksonException

Overrides tools.jackson.core.util.JsonParserDelegate.skipChildren.

Need to override, re-implement similar to how method defined in tools.jackson.core.base.ParserMinimalBase, to keep state correct here.

Annotations
@Override
Exceptions
JacksonException:

Doc from tools.jackson.core.JsonParser.skipChildren.

for low-level read issues

streamReadContextback to summary
public TokenStreamContext streamReadContext()

Overrides tools.jackson.core.util.JsonParserDelegate.streamReadContext.

Doc from tools.jackson.core.JsonParser.streamReadContext.

Method that can be used to access current parsing context reader is in. There are 3 different types: root, array and object contexts, with slightly different available information. Contexts are hierarchically nested, and can be used for example for figuring out part of the input document that correspond to specific array or object (for highlighting purposes, or error reporting). Contexts can also be used for simple xpath-like matching of input, if so desired.

Note

method was called getParsingContext() in Jackson 2.x

Annotations
@Override