public abstract class JsonParserBase extends ParserBase
JsonParser.Feature, JsonParser.NumberType, JsonParser.NumberTypeFP
Modifier and Type | Field and Description |
---|---|
protected ObjectCodec |
_objectCodec
Codec used for data binding when (if) requested; typically full
ObjectMapper , but that abstract is not part of core
package. |
protected static int |
FEAT_MASK_ALLOW_JAVA_COMMENTS |
protected static int |
FEAT_MASK_ALLOW_MISSING |
protected static int |
FEAT_MASK_ALLOW_SINGLE_QUOTES |
protected static int |
FEAT_MASK_ALLOW_UNQUOTED_NAMES |
protected static int |
FEAT_MASK_ALLOW_YAML_COMMENTS |
protected static int |
FEAT_MASK_LEADING_ZEROS |
protected static int |
FEAT_MASK_NON_NUM_NUMBERS |
protected static int |
FEAT_MASK_TRAILING_COMMA |
protected static int[] |
INPUT_CODES_LATIN1 |
protected static int[] |
INPUT_CODES_UTF8 |
_binaryValue, _byteArrayBuilder, _closed, _currInputProcessed, _currInputRow, _currInputRowStart, _expLength, _fractLength, _inputEnd, _inputPtr, _intLength, _ioContext, _nameCopied, _nameCopyBuffer, _nextToken, _numberBigDecimal, _numberBigInt, _numberDouble, _numberFloat, _numberInt, _numberIsNaN, _numberLong, _numberNegative, _numberString, _numTypesValid, _parsingContext, _streamReadConstraints, _textBuffer, _tokenInputCol, _tokenInputRow, _tokenInputTotal, JSON_READ_CAPABILITIES
_currToken, _lastClearedToken, BD_MAX_INT, BD_MAX_LONG, BD_MIN_INT, BD_MIN_LONG, BI_MAX_INT, BI_MAX_LONG, BI_MIN_INT, BI_MIN_LONG, CHAR_NULL, INT_0, INT_9, INT_APOS, INT_ASTERISK, INT_BACKSLASH, INT_COLON, INT_COMMA, INT_CR, INT_e, INT_E, INT_HASH, INT_LBRACKET, INT_LCURLY, INT_LF, INT_MINUS, INT_PERIOD, INT_PLUS, INT_QUOTE, INT_RBRACKET, INT_RCURLY, INT_SLASH, INT_SPACE, INT_TAB, MAX_ERROR_TOKEN_LENGTH, MAX_INT_D, MAX_INT_L, MAX_LONG_D, MIN_INT_D, MIN_INT_L, MIN_LONG_D, NO_BYTES, NO_INTS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_FLOAT, NR_INT, NR_LONG, NR_UNKNOWN
_features, _requestPayload, DEFAULT_READ_CAPABILITIES
Modifier | Constructor and Description |
---|---|
protected |
JsonParserBase(IOContext ioCtxt,
int features,
ObjectCodec codec) |
Modifier and Type | Method and Description |
---|---|
protected abstract JsonLocation |
_currentLocationMinusOne()
Factory method used to provide location for cases where we must read
and consume a single "wrong" character (to possibly allow error recovery),
but need to report accurate location for that character: if so, the
current location is past location we want, and location we want will be
"one location earlier".
|
abstract JsonLocation |
currentLocation()
Method that returns location of the last processed input unit (character
or byte) from the input;
usually for error reporting purposes.
|
abstract JsonLocation |
currentTokenLocation()
Method that return the starting location of the current
(most recently returned)
token; that is, the position of the first input unit (character or byte) from input
that starts the current token.
|
ObjectCodec |
getCodec()
Accessor for
ObjectCodec associated with this
parser, if any. |
JsonLocation |
getCurrentLocation()
Deprecated.
|
JacksonFeatureSet<StreamReadCapability> |
getReadCapabilities()
Accessor for getting metadata on capabilities of this parser, based on
underlying data format being read (directly or indirectly).
|
JsonLocation |
getTokenLocation()
Deprecated.
|
void |
setCodec(ObjectCodec c)
Setter that allows defining
ObjectCodec associated with this
parser, if any. |
_checkStdFeatureChanges, _closeInput, _contentReference, _contentReferenceRedacted, _convertBigDecimalToBigInteger, _decodeBase64Escape, _decodeBase64Escape, _decodeEscaped, _eofAsNextChar, _finishString, _getBigDecimal, _getBigInteger, _getByteArrayBuilder, _getNumberDouble, _getNumberFloat, _getSourceReference, _growNameDecodeBuffer, _handleBase64MissingPadding, _handleEOF, _handleUnrecognizedCharacterEscape, _parseIntValue, _parseNumericValue, _releaseBuffers, _reportMismatchedEndMarker, _reportTooLongIntegral, _throwUnquotedSpace, _validJsonTokenList, _validJsonValueList, assignCurrentValue, close, convertNumberToBigDecimal, convertNumberToBigInteger, convertNumberToDouble, convertNumberToFloat, convertNumberToInt, convertNumberToLong, createChildArrayContext, createChildObjectContext, currentValue, disable, enable, getBigIntegerValue, getBinaryValue, getCurrentName, getDecimalValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getNumberType, getNumberValue, getNumberValueDeferred, getNumberValueExact, getParsingContext, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, growArrayBy, hasTextCharacters, isClosed, isNaN, loadMore, loadMoreGuaranteed, overrideCurrentName, overrideStdFeatures, reportInvalidBase64Char, reportInvalidBase64Char, reset, resetAsNaN, resetFloat, resetInt, setFeatureMask, streamReadConstraints, version
_ascii, _asciiBytes, _constructError, _decodeBase64, _getCharDesc, _hasTextualNull, _longIntegerDesc, _longNumberDesc, _reportError, _reportError, _reportError, _reportInputCoercion, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportMissingRootWS, _reportUnexpectedChar, _reportUnexpectedNumberChar, _throwInternal, _throwInternalReturnAny, _throwInvalidSpace, _wrapError, clearCurrentToken, currentToken, currentTokenId, getCurrentToken, getCurrentTokenId, getLastClearedToken, getText, getTextCharacters, getTextLength, getTextOffset, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, getValueAsString, getValueAsString, hasCurrentToken, hasToken, hasTokenId, isExpectedNumberIntToken, isExpectedStartArrayToken, isExpectedStartObjectToken, nextToken, nextValue, reportInvalidNumber, reportOverflowInt, reportOverflowInt, reportOverflowInt, reportOverflowLong, reportOverflowLong, reportOverflowLong, reportUnexpectedNumberChar, skipChildren
_codec, _constructError, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _reportUnsupportedOperation, canParseAsync, canReadObjectId, canReadTypeId, canUseSchema, configure, currentName, finishToken, getBinaryValue, getBooleanValue, getByteValue, getCurrentValue, getEmbeddedObject, getFeatureMask, getFormatFeatures, getInputSource, getNonBlockingInputFeeder, getNumberTypeFP, getObjectId, getSchema, getShortValue, getText, getTypeId, getValueAsBoolean, getValueAsDouble, isEnabled, isEnabled, nextBooleanValue, nextFieldName, nextFieldName, nextIntValue, nextLongValue, nextTextValue, overrideFormatFeatures, readBinaryValue, readBinaryValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, releaseBuffered, requiresCustomCodec, setCurrentValue, setRequestPayloadOnError, setRequestPayloadOnError, setRequestPayloadOnError, setSchema
protected static final int FEAT_MASK_TRAILING_COMMA
protected static final int FEAT_MASK_LEADING_ZEROS
protected static final int FEAT_MASK_NON_NUM_NUMBERS
protected static final int FEAT_MASK_ALLOW_MISSING
protected static final int FEAT_MASK_ALLOW_SINGLE_QUOTES
protected static final int FEAT_MASK_ALLOW_UNQUOTED_NAMES
protected static final int FEAT_MASK_ALLOW_JAVA_COMMENTS
protected static final int FEAT_MASK_ALLOW_YAML_COMMENTS
protected static final int[] INPUT_CODES_LATIN1
protected static final int[] INPUT_CODES_UTF8
protected ObjectCodec _objectCodec
ObjectMapper
, but that abstract is not part of core
package.protected JsonParserBase(IOContext ioCtxt, int features, ObjectCodec codec)
public ObjectCodec getCodec()
JsonParser
ObjectCodec
associated with this
parser, if any. Codec is used by JsonParser.readValueAs(Class)
method (and its variants).getCodec
in class JsonParser
null
if nonepublic void setCodec(ObjectCodec c)
JsonParser
ObjectCodec
associated with this
parser, if any. Codec is used by JsonParser.readValueAs(Class)
method (and its variants).setCodec
in class JsonParser
c
- Codec to assign, if any; null
if nonepublic final JacksonFeatureSet<StreamReadCapability> getReadCapabilities()
JsonParser
getReadCapabilities
in class JsonParser
public abstract JsonLocation currentLocation()
JsonParser
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 JsonLocation.NA
due to not having access
to input location information (when delegating actual decoding work
to other library)
currentLocation
in class JsonParser
public abstract JsonLocation currentTokenLocation()
JsonParser
Note that the location is not guaranteed to be accurate (although most
implementation will try their best): some implementations may only
return JsonLocation.NA
due to not having access
to input location information (when delegating actual decoding work
to other library)
currentTokenLocation
in class JsonParser
protected abstract JsonLocation _currentLocationMinusOne()
ParserMinimalBase
Default implementation simply returns JsonParser.currentLocation()
_currentLocationMinusOne
in class ParserMinimalBase
JsonParser.currentLocation()
except offset by -1@Deprecated public final JsonLocation getCurrentLocation()
ParserBase
getCurrentLocation
in class ParserBase
@Deprecated public final JsonLocation getTokenLocation()
ParserBase
getTokenLocation
in class ParserBase
Copyright © 2008–2024 FasterXML. All rights reserved.