程序包 org.jsfr.json
接口 ParsingContext
-
- 所有已知实现类:
SurfingContext
public interface ParsingContextCreated by Leo on 2015/3/22.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 <T> Tcast(Object object, Class<T> tClass)intgetCurrentArrayIndex()StringgetCurrentFieldName()StringgetJsonPath()booleanisPaused()booleanisStopped()<T> Tload(String key, Class<T> tClass)voidpause()Pause parsingvoidresume()Resume parsingvoidsave(String key, Object value)Save a transient data during parsingvoidstop()Stop parsing
-
-
-
方法详细资料
-
stop
void stop()
Stop parsing
-
isStopped
boolean isStopped()
- 返回:
- Whether parsing is stopped
-
pause
void pause()
Pause parsing
-
resume
void resume()
Resume parsing
-
isPaused
boolean isPaused()
- 返回:
- Whether parsing is paused
-
getJsonPath
String getJsonPath()
- 返回:
- The current JsonPath
-
getCurrentFieldName
String getCurrentFieldName()
- 返回:
- The current field name. Null if current position is not in json object
-
getCurrentArrayIndex
int getCurrentArrayIndex()
- 返回:
- The current index of json array. -1 if current position is not in json array
-
save
void save(String key, Object value)
Save a transient data during parsing- 参数:
key- keyvalue- value
-
load
<T> T load(String key, Class<T> tClass)
- 类型参数:
T- type- 参数:
key- keytClass- class to cast- 返回:
- Saved value
-
-