Package com.alibaba.fastjson2
Class JSONReader
java.lang.Object
com.alibaba.fastjson2.JSONReader
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected charprotected booleanprotected Objectprotected byteprotected intprotected intprotected intprotected intprotected booleanprotected booleanprotected intprotected byteprotected Stringprotected booleanprotected booleanprotected byteprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResolveTask(FieldReader fieldReader, Object object, JSONPath path) voidaddResolveTask(Object[] object, int i, JSONPath reference) voidaddResolveTask(Collection object, int i, JSONPath reference) voidaddResolveTask(Map object, Object key, JSONPath reference) autoTypeFilter(String... names) checkAutoType(Class expectClass, long expectClassHash, long features) voidclose()final charcurrent()voidendArray()longfeatures(long features) abstract Stringintprotected LonggetInt64()protected longabstract longgetObjectReader(Type type) final intabstract Stringprotected abstract intbytegetType()protected ZoneIdgetZoneId(LocalDateTime ldt, String zoneIdStr) voidhandleResolveTasks(Object root) info()booleanisArray()booleanisBinary()booleanisEnabled(JSONReader.Feature feature) final booleanisEnd()booleanbooleanisInt()booleanisJSONB()booleanbooleanabstract booleanisNull()booleanisNumber()booleanisObject()abstract booleanbooleanisString()booleanisSupportAutoType(long features) booleanbooleanisSupportBeanArray(long features) booleanbooleanisSupportSmartMatch(long features) booleanabstract voidnext()abstract booleanbooleannextIfMatch(byte type) abstract booleannextIfMatch(char ch) abstract booleannextIfMatchIdent(char c0, char c1, char c2) abstract booleannextIfMatchIdent(char c0, char c1, char c2, char c3) abstract booleannextIfMatchIdent(char c0, char c1, char c2, char c3, char c4, char c5) abstract booleanbooleanbooleanabstract booleanstatic JSONReaderof(byte[] utf8Bytes) static JSONReaderof(byte[] bytes, int offset, int length) static JSONReaderstatic JSONReaderof(char[] chars) static JSONReaderof(char[] chars, int offset, int length) static JSONReaderof(JSONReader.Context context, byte[] utf8Bytes) static JSONReaderof(JSONReader.Context context, char[] chars) static JSONReaderof(JSONReader.Context context, String str) static JSONReaderof(InputStream is, Charset charset) static JSONReaderstatic JSONReaderstatic JSONReaderstatic JSONReaderofJSONB(byte[] jsonbBytes) static JSONReaderofJSONB(byte[] bytes, int offset, int length) static JSONReaderofJSONB(byte[] bytes, int offset, int length, SymbolTable symbolTable) static JSONReaderofJSONB(byte[] jsonbBytes, JSONReader.Feature... features) static JSONReaderofJSONB(JSONReader.Context context, byte[] jsonbBytes) <T> T<T> Tvoidread(Collection list) voidvoidreadAny()voidbyte[]readBool()booleanchardoubleabstract Stringabstract longabstract longfloatabstract booleanabstract Integerabstract intabstract Longabstract longprotected abstract LocalDateTimeprotected abstract LocalDateTimeprotected abstract LocalDateTimeprotected abstract LocalDateTimeprotected abstract LocalDateTimeprotected abstract LocalDateTimeprotected abstract LocalDateTimeprotected abstract LocalDateTimeprotected abstract LocalDateTimereadLocalDateTimeX(int len) protected abstract LocalTimeprotected abstract LocalTimeprotected abstract LocalTimeprotected abstract LocalTimeprotected abstract LocalTimelongabstract voidreadNull()abstract DatevoidreadNumber(ValueConsumer consumer, boolean quoted) protected abstract voidvoidreadObject(Object object, long features) voidreadObject(Object object, JSONReader.Feature... features) abstract Stringabstract Stringabstract StringvoidreadString(ValueConsumer consumer, boolean quoted) longabstract UUIDreadUUID()abstract longprotected abstract ZonedDateTimereadZonedDateTimeX(int len) voidsetTypeRedirect(boolean typeRedirect) abstract voidabstract booleanskipName()abstract voidintprotected final intprotected final intprotected final longprotected final longprotected final Numberprotected final Numberprotected final Stringprotected final StringbooleanwasNull()
-
Field Details
-
offset
protected int offset -
ch
protected char ch -
comma
protected boolean comma -
nameEscape
protected boolean nameEscape -
valueEscape
protected boolean valueEscape -
wasNull
protected boolean wasNull -
boolValue
protected boolean boolValue -
negative
protected boolean negative -
valueType
protected byte valueType -
exponent
protected byte exponent -
scale
protected byte scale -
mag0
protected int mag0 -
mag1
protected int mag1 -
mag2
protected int mag2 -
mag3
protected int mag3 -
stringValue
-
complex
-
typeRedirect
protected boolean typeRedirect
-
-
Constructor Details
-
JSONReader
-
-
Method Details
-
current
public final char current() -
isEnd
public final boolean isEnd() -
getType
public byte getType() -
isInt
public boolean isInt() -
isNull
public abstract boolean isNull() -
readNullOrNewDate
-
nextIfNull
public abstract boolean nextIfNull() -
getContext
-
isEnabled
-
getLocale
-
getZoneId
-
features
public long features(long features) -
handleResolveTasks
-
getObjectReader
-
isSupportSmartMatch
public boolean isSupportSmartMatch() -
isSupportSmartMatch
public boolean isSupportSmartMatch(long features) -
isSupportBeanArray
public boolean isSupportBeanArray() -
isSupportBeanArray
public boolean isSupportBeanArray(long features) -
isSupportAutoType
public boolean isSupportAutoType(long features) -
isJSONB
public boolean isJSONB() -
isIgnoreNoneSerializable
public boolean isIgnoreNoneSerializable() -
checkAutoType
-
nextIfObjectStart
public boolean nextIfObjectStart() -
nextIfEmptyString
public abstract boolean nextIfEmptyString() -
nextIfObjectEnd
public boolean nextIfObjectEnd() -
startArray
public int startArray() -
isReference
public abstract boolean isReference() -
readReference
-
addResolveTask
-
addResolveTask
-
addResolveTask
-
addResolveTask
-
isArray
public boolean isArray() -
isObject
public boolean isObject() -
isNumber
public boolean isNumber() -
isString
public boolean isString() -
endArray
public void endArray() -
nextIfMatch
public abstract boolean nextIfMatch(char ch) -
nextIfSet
public abstract boolean nextIfSet() -
readPattern
-
getOffset
public final int getOffset() -
next
public abstract void next() -
readValueHashCode
public abstract long readValueHashCode() -
readTypeHashCode
public long readTypeHashCode() -
readFieldNameHashCode
public abstract long readFieldNameHashCode() -
getNameHashCodeLCase
public abstract long getNameHashCodeLCase() -
readFieldName
-
getFieldName
-
setTypeRedirect
public void setTypeRedirect(boolean typeRedirect) -
isTypeRedirect
public boolean isTypeRedirect() -
readFieldNameHashCodeUnquote
public abstract long readFieldNameHashCodeUnquote() -
readFieldNameUnquote
-
skipName
public abstract boolean skipName() -
skipValue
public abstract void skipValue() -
isBinary
public boolean isBinary() -
readBinary
public byte[] readBinary() -
readInt32Value
public abstract int readInt32Value() -
nextIfMatch
public boolean nextIfMatch(byte type) -
nextIfMatchIdent
public abstract boolean nextIfMatchIdent(char c0, char c1, char c2) -
nextIfMatchIdent
public abstract boolean nextIfMatchIdent(char c0, char c1, char c2, char c3) -
nextIfMatchIdent
public abstract boolean nextIfMatchIdent(char c0, char c1, char c2, char c3, char c4, char c5) -
readInt32
-
getInt32Value
public int getInt32Value() -
getInt64Value
protected long getInt64Value() -
getInt64
-
readInt64Value
public abstract long readInt64Value() -
readInt64
-
readFloatValue
public float readFloatValue() -
readFloat
-
readDoubleValue
public double readDoubleValue() -
readDouble
-
readNumber
-
readBigInteger
-
readBigDecimal
-
readUUID
-
isLocalDate
public boolean isLocalDate() -
readLocalDate
-
isLocalDateTime
public boolean isLocalDateTime() -
readLocalDateTime
-
readZonedDateTime
-
readLocalTime
-
getStringLength
protected abstract int getStringLength() -
readInstant
-
readMillisFromString
public long readMillisFromString() -
readLocalDateTime16
-
readLocalDateTime17
-
readLocalDateTime18
-
readLocalDateTime19
-
readLocalDateTimeX
-
readLocalTime8
-
readLocalTime10
-
readLocalTime11
-
readLocalTime12
-
readLocalTime18
-
readLocalDate8
-
readLocalDate9
-
readLocalDate10
-
readLocalDate11
-
readZonedDateTimeX
-
readNumber
-
readString
-
readNumber0
protected abstract void readNumber0() -
readString
-
readCharValue
public char readCharValue() -
readNull
public abstract void readNull() -
readIfNull
public abstract boolean readIfNull() -
getString
-
wasNull
public boolean wasNull() -
read
-
read
-
read
-
readObject
-
readObject
-
read
-
read
-
readObject
-
skipLineComment
public abstract void skipLineComment() -
readBool
-
readBoolValue
public boolean readBoolValue() -
readAny
-
readArray
-
readArray
-
readArray
-
getBigInteger
-
getBigDecimal
-
getNumber
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
toInt32
-
toInt64
-
toLong
-
toInt
-
toNumber
-
toNumber
-
toString
-
toString
-
of
-
of
-
of
-
of
-
ofJSONB
-
ofJSONB
-
ofJSONB
-
ofJSONB
-
ofJSONB
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
autoTypeFilter
-
getZoneId
-
info
-
info
-