Class JSONReader

java.lang.Object
com.alibaba.fastjson2.JSONReader
All Implemented Interfaces:
Closeable, AutoCloseable

public abstract class JSONReader extends Object implements Closeable
  • Field Details

    • context

      protected final JSONReader.Context context
    • 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 short exponent
    • scale

      protected byte scale
    • mag0

      protected int mag0
    • mag1

      protected int mag1
    • mag2

      protected int mag2
    • mag3

      protected int mag3
    • stringValue

      protected String stringValue
    • complex

      protected Object complex
    • typeRedirect

      protected boolean typeRedirect
    • doubleChars

      protected char[] doubleChars
  • Constructor Details

  • 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()
    • hasComma

      public boolean hasComma()
    • readNullOrNewDate

      public abstract Date readNullOrNewDate()
    • nextIfNull

      public abstract boolean nextIfNull()
    • getContext

      public JSONReader.Context getContext()
    • errorOnNoneSerializable

      public void errorOnNoneSerializable(Class objectClass)
    • isEnabled

      public boolean isEnabled(JSONReader.Feature feature)
    • getLocale

      public Locale getLocale()
    • getZoneId

      public ZoneId getZoneId()
    • features

      public long features(long features)
    • handleResolveTasks

      public void handleResolveTasks(Object root)
    • getObjectReader

      public ObjectReader getObjectReader(Type type)
    • 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

      public ObjectReader checkAutoType(Class expectClass, long expectClassHash, long features)
    • nextIfObjectStart

      public boolean nextIfObjectStart()
    • nextIfEmptyString

      public abstract boolean nextIfEmptyString()
    • nextIfObjectEnd

      public boolean nextIfObjectEnd()
    • startArray

      public int startArray()
    • isReference

      public abstract boolean isReference()
    • readReference

      public abstract String readReference()
    • addResolveTask

      public void addResolveTask(FieldReader fieldReader, Object object, JSONPath path)
    • addResolveTask

      public void addResolveTask(Map object, Object key, JSONPath reference)
    • addResolveTask

      public void addResolveTask(Collection object, int i, JSONPath reference)
    • addResolveTask

      public void addResolveTask(Object[] object, int i, JSONPath reference)
    • 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()
    • nextIfInfinity

      public boolean nextIfInfinity()
    • readPattern

      public abstract String 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

      public abstract String readFieldName()
    • getFieldName

      public abstract String getFieldName()
    • setTypeRedirect

      public void setTypeRedirect(boolean typeRedirect)
    • isTypeRedirect

      public boolean isTypeRedirect()
    • readFieldNameHashCodeUnquote

      public abstract long readFieldNameHashCodeUnquote()
    • readFieldNameUnquote

      public String readFieldNameUnquote()
    • skipName

      public abstract boolean skipName()
    • skipValue

      public abstract void skipValue()
    • isBinary

      public boolean isBinary()
    • readHex

      public abstract byte[] readHex()
    • 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)
    • nextIfMatchIdent

      public abstract boolean nextIfMatchIdent(char c0, char c1, char c2, char c3, char c4, char c5)
    • readInt32

      public abstract Integer readInt32()
    • getInt32Value

      public int getInt32Value()
    • getInt64Value

      public long getInt64Value()
    • getInt64

      protected Long getInt64()
    • readInt64Value

      public abstract long readInt64Value()
    • readInt64

      public abstract Long readInt64()
    • readFloatValue

      public abstract float readFloatValue()
    • readFloat

      public Float readFloat()
    • readDoubleValue

      public abstract double readDoubleValue()
    • readDouble

      public Double readDouble()
    • readNumber

      public Number readNumber()
    • readBigInteger

      public BigInteger readBigInteger()
    • readBigDecimal

      public BigDecimal readBigDecimal()
    • readUUID

      public abstract UUID readUUID()
    • isLocalDate

      public boolean isLocalDate()
    • readLocalDate

      public LocalDate readLocalDate()
    • isLocalDateTime

      public boolean isLocalDateTime()
    • readLocalDateTime

      public LocalDateTime readLocalDateTime()
    • readZonedDateTime

      public ZonedDateTime readZonedDateTime()
    • readLocalTime

      public LocalTime readLocalTime()
    • getStringLength

      protected abstract int getStringLength()
    • readInstant

      public Instant readInstant()
    • readMillisFromString

      public long readMillisFromString()
    • readLocalDateTime16

      protected abstract LocalDateTime readLocalDateTime16()
    • readLocalDateTime17

      protected abstract LocalDateTime readLocalDateTime17()
    • readLocalDateTime18

      protected abstract LocalDateTime readLocalDateTime18()
    • readLocalDateTime19

      protected abstract LocalDateTime readLocalDateTime19()
    • readMillis19

      public abstract long readMillis19()
    • readLocalDateTimeX

      protected abstract LocalDateTime readLocalDateTimeX(int len)
    • readLocalTime5

      protected abstract LocalTime readLocalTime5()
    • readLocalTime8

      protected abstract LocalTime readLocalTime8()
    • readLocalTime10

      protected abstract LocalTime readLocalTime10()
    • readLocalTime11

      protected abstract LocalTime readLocalTime11()
    • readLocalTime12

      protected abstract LocalTime readLocalTime12()
    • readLocalTime18

      protected abstract LocalTime readLocalTime18()
    • readLocalDate8

      protected abstract LocalDate readLocalDate8()
    • readLocalDate9

      protected abstract LocalDate readLocalDate9()
    • readLocalDate10

      protected abstract LocalDate readLocalDate10()
    • readLocalDate11

      protected abstract LocalDate readLocalDate11()
    • readZonedDateTimeX

      protected abstract ZonedDateTime readZonedDateTimeX(int len)
    • readNumber

      public void readNumber(ValueConsumer consumer, boolean quoted)
    • readString

      public void readString(ValueConsumer consumer, boolean quoted)
    • readNumber0

      protected abstract void readNumber0()
    • readString

      public abstract String readString()
    • readCharValue

      public char readCharValue()
    • readNull

      public abstract void readNull()
    • readIfNull

      public abstract boolean readIfNull()
    • getString

      public abstract String getString()
    • wasNull

      public boolean wasNull()
    • read

      public <T> T read(Type type)
    • read

      public void read(List list)
    • read

      public void read(Collection list)
    • readObject

      public void readObject(Object object, JSONReader.Feature... features)
    • readObject

      public void readObject(Object object, long features)
    • read

      public void read(Map object, long features)
    • read

      public void read(Map object, Type keyType, Type valueType, long features)
    • read

      public <T> T read(Class<T> type)
    • readObject

      public Map<String,Object> readObject()
    • skipLineComment

      public abstract void skipLineComment()
    • readBool

      public Boolean readBool()
    • readBoolValue

      public boolean readBoolValue()
    • readAny

      public Object readAny()
    • readArray

      public List readArray(Type itemType)
    • readList

      public List readList(Type[] types)
    • readArray

      public Object[] readArray(Type[] types)
    • readArray

      public void readArray(List list, Type itemType)
    • readArray

      public void readArray(Collection list, Type itemType)
    • readArray

      public List readArray()
    • getBigInteger

      public BigInteger getBigInteger()
    • getBigDecimal

      public BigDecimal getBigDecimal()
    • getNumber

      public Number getNumber()
    • close

      public abstract void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • toInt32

      protected final int toInt32(String val)
    • toInt64

      protected final long toInt64(String val)
    • toLong

      protected final long toLong(Map map)
    • toInt

      protected final int toInt(List list)
    • toNumber

      protected final Number toNumber(Map map)
    • toNumber

      protected final Number toNumber(List list)
    • toString

      protected final String toString(List array)
    • toString

      protected final String toString(Map object)
    • of

      public static JSONReader of(byte[] utf8Bytes)
    • of

      @Deprecated public static JSONReader of(JSONReader.Context context, byte[] utf8Bytes)
      Deprecated.
    • of

      public static JSONReader of(byte[] utf8Bytes, JSONReader.Context context)
    • of

      public static JSONReader of(char[] chars)
    • of

      @Deprecated public static JSONReader of(JSONReader.Context context, char[] chars)
      Deprecated.
    • of

      public static JSONReader of(char[] chars, JSONReader.Context context)
    • ofJSONB

      public static JSONReader ofJSONB(byte[] jsonbBytes)
    • ofJSONB

      @Deprecated public static JSONReader ofJSONB(JSONReader.Context context, byte[] jsonbBytes)
      Deprecated.
    • ofJSONB

      public static JSONReader ofJSONB(byte[] jsonbBytes, JSONReader.Context context)
    • ofJSONB

      public static JSONReader ofJSONB(byte[] jsonbBytes, JSONReader.Feature... features)
    • ofJSONB

      public static JSONReader ofJSONB(byte[] bytes, int offset, int length)
    • ofJSONB

      public static JSONReader ofJSONB(byte[] bytes, int offset, int length, SymbolTable symbolTable)
    • of

      public static JSONReader of(byte[] bytes, int offset, int length, Charset charset)
    • of

      public static JSONReader of(byte[] bytes, int offset, int length, Charset charset, JSONReader.Context context)
    • of

      public static JSONReader of(byte[] bytes, int offset, int length)
    • of

      public static JSONReader of(char[] chars, int offset, int length)
    • of

      public static JSONReader of(char[] chars, int offset, int length, JSONReader.Context context)
    • of

      public static JSONReader of(InputStream is, Charset charset)
    • of

      public static JSONReader of(InputStream is, Charset charset, JSONReader.Context context)
    • of

      public static JSONReader of(Reader is)
    • of

      public static JSONReader of(Reader is, JSONReader.Context context)
    • of

      @Deprecated public static JSONReader of(JSONReader.Context context, String str)
      Deprecated.
    • of

      public static JSONReader of(String str)
    • of

      public static JSONReader of(String str, JSONReader.Context context)
    • of

      public static JSONReader of(String str, int offset, int length)
    • of

      public static JSONReader of(String str, int offset, int length, JSONReader.Context context)
    • autoTypeFilter

      public static JSONReader.AutoTypeBeforeHandler autoTypeFilter(String... names)
    • autoTypeFilter

      public static JSONReader.AutoTypeBeforeHandler autoTypeFilter(boolean includeBasic, String... names)
    • autoTypeFilter

      public static JSONReader.AutoTypeBeforeHandler autoTypeFilter(Class... types)
    • autoTypeFilter

      public static JSONReader.AutoTypeBeforeHandler autoTypeFilter(boolean includeBasic, Class... types)
    • mark

      public JSONReader.SavePoint mark()
    • reset

      public void reset(JSONReader.SavePoint savePoint)
    • info

      public String info()
    • info

      public String info(String message)