com.alibaba.fastjson.parser
Class DefaultJSONParser
java.lang.Object
com.alibaba.fastjson.parser.AbstractJSONParser
com.alibaba.fastjson.parser.DefaultJSONParser
- Direct Known Subclasses:
- DefaultExtJSONParser
public class DefaultJSONParser
- extends AbstractJSONParser
- Author:
- wenshao
parseArray(Class<T> clazz)
|
void |
parseArray(Collection array)
|
void |
parseArray(Collection array,
Object fieldName)
|
Object[] |
parseArray(Type[] types)
|
void |
parseArray(Type type,
Collection array)
|
void |
parseArray(Type type,
Collection array,
Object fieldName)
|
Object |
parseArrayWithType(Type collectionType)
|
JSONObject |
parseObject()
|
|
parseObject(Class<T> clazz)
|
Object |
parseObject(Map object)
|
Object |
parseObject(Map object,
Object fieldName)
|
void |
parseObject(Object object)
|
|
parseObject(Type type)
|
void |
popContext()
|
void |
setConfig(ParserConfig config)
|
ParseContext |
setContext(Object object,
Object fieldName)
|
void |
setContext(ParseContext context)
|
ParseContext |
setContext(ParseContext parent,
Object object,
Object fieldName)
|
void |
setDateFomrat(DateFormat dateFormat)
|
void |
setDateFormat(String dateFormat)
|
void |
setResolveStatus(int resolveStatus)
|
NONE
public static final int NONE
- See Also:
- Constant Field Values
NeedToResolve
public static final int NeedToResolve
- See Also:
- Constant Field Values
TypeNameRedirect
public static final int TypeNameRedirect
- See Also:
- Constant Field Values
DefaultJSONParser
public DefaultJSONParser(String input)
DefaultJSONParser
public DefaultJSONParser(String input,
ParserConfig config)
DefaultJSONParser
public DefaultJSONParser(String input,
ParserConfig config,
int features)
DefaultJSONParser
public DefaultJSONParser(char[] input,
int length,
ParserConfig config,
int features)
DefaultJSONParser
public DefaultJSONParser(Object input,
JSONLexer lexer,
ParserConfig config)
getDateFomartPattern
public String getDateFomartPattern()
getDateFormat
public DateFormat getDateFormat()
setDateFormat
public void setDateFormat(String dateFormat)
setDateFomrat
public void setDateFomrat(DateFormat dateFormat)
getSymbolTable
public SymbolTable getSymbolTable()
getInput
public String getInput()
parseObject
public final Object parseObject(Map object,
Object fieldName)
getConfig
public ParserConfig getConfig()
setConfig
public void setConfig(ParserConfig config)
parseObject
public <T> T parseObject(Class<T> clazz)
parseObject
public <T> T parseObject(Type type)
parseArray
public <T> List<T> parseArray(Class<T> clazz)
parseArray
public void parseArray(Class<?> clazz,
Collection array)
parseArray
public void parseArray(Type type,
Collection array)
parseArray
public void parseArray(Type type,
Collection array,
Object fieldName)
parseArray
public Object[] parseArray(Type[] types)
parseObject
public void parseObject(Object object)
parseArrayWithType
public Object parseArrayWithType(Type collectionType)
acceptType
public void acceptType(String typeName)
getResolveStatus
public int getResolveStatus()
setResolveStatus
public void setResolveStatus(int resolveStatus)
getObject
public Object getObject(String path)
checkListResolve
public void checkListResolve(Collection array)
checkMapResolve
public void checkMapResolve(Map object,
String fieldName)
parseObject
public Object parseObject(Map object)
parseObject
public JSONObject parseObject()
parseArray
public final void parseArray(Collection array)
parseArray
public final void parseArray(Collection array,
Object fieldName)
getContext
public ParseContext getContext()
getResolveTaskList
public List<DefaultJSONParser.ResolveTask> getResolveTaskList()
addResolveTask
public void addResolveTask(DefaultJSONParser.ResolveTask task)
getLastResolveTask
public DefaultJSONParser.ResolveTask getLastResolveTask()
setContext
public void setContext(ParseContext context)
popContext
public void popContext()
setContext
public ParseContext setContext(Object object,
Object fieldName)
setContext
public ParseContext setContext(ParseContext parent,
Object object,
Object fieldName)
getContextLength
public int getContextLength()
clearContext
public void clearContext(ParseContext context,
int start)
parse
public Object parse()
parse
public Object parse(Object fieldName)
config
public void config(Feature feature,
boolean state)
isEnabled
public boolean isEnabled(Feature feature)
getLexer
public JSONLexer getLexer()
accept
public final void accept(int token)
close
public void close()
Copyright © 2012
Alibaba Group. All Rights Reserved.