Package com.alibaba.fastjson.parser
Interface JSONLexer
-
- All Known Implementing Classes:
JSONLexerBase,JSONReaderScanner,JSONScanner
public interface JSONLexer
-
-
Field Summary
Fields Modifier and Type Field Description static intARRAYstatic intENDstatic charEOIstatic intNOT_MATCHstatic intNOT_MATCH_NAMEstatic intOBJECTstatic intUNKNOWNstatic intVALUEstatic intVALUE_NULL
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]bytesValue()voidclose()voidconfig(Feature feature, boolean state)BigDecimaldecimalValue()NumberdecimalValue(boolean decimal)floatfloatValue()chargetCurrent()intgetFeatures()LocalegetLocale()TimeZonegetTimeZone()Stringinfo()NumberintegerValue()intintValue()booleanisBlankInput()booleanisEnabled(int feature)booleanisEnabled(Feature feature)booleanisRef()longlongValue()charnext()voidnextToken()voidnextToken(int expect)voidnextTokenWithColon()voidnextTokenWithColon(int expect)StringnumberString()intpos()voidresetStringPosition()booleanscanBoolean(char expectNext)BigDecimalscanDecimal(char seperator)doublescanDouble(char seperator)Enum<?>scanEnum(Class<?> enumClass, SymbolTable symbolTable, char serperator)floatscanFloat(char seperator)intscanInt(char expectNext)longscanLong(char expectNextChar)voidscanNumber()voidscanString()StringscanString(char expectNextChar)voidscanStringArray(Collection<String> collection, char seperator)StringscanSymbol(SymbolTable symbolTable)StringscanSymbol(SymbolTable symbolTable, char quote)StringscanSymbolUnQuoted(SymbolTable symbolTable)StringscanSymbolWithSeperator(SymbolTable symbolTable, char serperator)StringscanTypeName(SymbolTable symbolTable)voidsetFeatures(int features)voidsetLocale(Locale locale)voidsetTimeZone(TimeZone timeZone)voidskipWhitespace()StringstringVal()inttoken()StringtokenName()
-
-
-
Field Detail
-
EOI
static final char EOI
- See Also:
- Constant Field Values
-
NOT_MATCH
static final int NOT_MATCH
- See Also:
- Constant Field Values
-
NOT_MATCH_NAME
static final int NOT_MATCH_NAME
- See Also:
- Constant Field Values
-
UNKNOWN
static final int UNKNOWN
- See Also:
- Constant Field Values
-
OBJECT
static final int OBJECT
- See Also:
- Constant Field Values
-
ARRAY
static final int ARRAY
- See Also:
- Constant Field Values
-
VALUE
static final int VALUE
- See Also:
- Constant Field Values
-
END
static final int END
- See Also:
- Constant Field Values
-
VALUE_NULL
static final int VALUE_NULL
- See Also:
- Constant Field Values
-
-
Method Detail
-
token
int token()
-
tokenName
String tokenName()
-
skipWhitespace
void skipWhitespace()
-
nextToken
void nextToken()
-
nextToken
void nextToken(int expect)
-
getCurrent
char getCurrent()
-
next
char next()
-
scanSymbol
String scanSymbol(SymbolTable symbolTable)
-
scanSymbol
String scanSymbol(SymbolTable symbolTable, char quote)
-
resetStringPosition
void resetStringPosition()
-
scanNumber
void scanNumber()
-
pos
int pos()
-
integerValue
Number integerValue()
-
decimalValue
BigDecimal decimalValue()
-
decimalValue
Number decimalValue(boolean decimal)
-
scanSymbolUnQuoted
String scanSymbolUnQuoted(SymbolTable symbolTable)
-
stringVal
String stringVal()
-
isEnabled
boolean isEnabled(int feature)
-
isEnabled
boolean isEnabled(Feature feature)
-
config
void config(Feature feature, boolean state)
-
scanString
void scanString()
-
intValue
int intValue()
-
nextTokenWithColon
void nextTokenWithColon()
-
nextTokenWithColon
void nextTokenWithColon(int expect)
-
isBlankInput
boolean isBlankInput()
-
close
void close()
-
longValue
long longValue()
-
isRef
boolean isRef()
-
scanTypeName
String scanTypeName(SymbolTable symbolTable)
-
numberString
String numberString()
-
bytesValue
byte[] bytesValue()
-
floatValue
float floatValue()
-
scanInt
int scanInt(char expectNext)
-
scanLong
long scanLong(char expectNextChar)
-
scanFloat
float scanFloat(char seperator)
-
scanDouble
double scanDouble(char seperator)
-
scanBoolean
boolean scanBoolean(char expectNext)
-
scanDecimal
BigDecimal scanDecimal(char seperator)
-
scanString
String scanString(char expectNextChar)
-
scanEnum
Enum<?> scanEnum(Class<?> enumClass, SymbolTable symbolTable, char serperator)
-
scanSymbolWithSeperator
String scanSymbolWithSeperator(SymbolTable symbolTable, char serperator)
-
scanStringArray
void scanStringArray(Collection<String> collection, char seperator)
-
getTimeZone
TimeZone getTimeZone()
-
setTimeZone
void setTimeZone(TimeZone timeZone)
-
getLocale
Locale getLocale()
-
setLocale
void setLocale(Locale locale)
-
info
String info()
-
getFeatures
int getFeatures()
-
setFeatures
void setFeatures(int features)
-
-