public final class JsonReadContext extends JsonStreamContext
JsonStreamContext
, which implements
core methods needed, and also exposes
more complete API to parser implementation classes.Modifier and Type | Field and Description |
---|---|
protected JsonReadContext |
_child |
protected int |
_columnNr |
protected String |
_currentName |
protected int |
_lineNr |
protected JsonReadContext |
_parent |
_index, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT
Constructor and Description |
---|
JsonReadContext(JsonReadContext parent,
int type,
int lineNr,
int colNr) |
Modifier and Type | Method and Description |
---|---|
JsonReadContext |
createChildArrayContext(int lineNr,
int colNr) |
JsonReadContext |
createChildObjectContext(int lineNr,
int colNr) |
static JsonReadContext |
createRootContext() |
static JsonReadContext |
createRootContext(int lineNr,
int colNr) |
boolean |
expectComma() |
String |
getCurrentName()
Method for accessing name associated with the current location.
|
JsonReadContext |
getParent()
Accessor for finding parent context of this context; will
return null for root context.
|
JsonLocation |
getStartLocation(Object srcRef) |
protected void |
reset(int type,
int lineNr,
int colNr) |
void |
setCurrentName(String name) |
String |
toString()
Overridden to provide developer readable "JsonPath" representation
of the context.
|
getCurrentIndex, getEntryCount, getTypeDesc, inArray, inObject, inRoot
protected final JsonReadContext _parent
protected int _lineNr
protected int _columnNr
protected String _currentName
protected JsonReadContext _child
public JsonReadContext(JsonReadContext parent, int type, int lineNr, int colNr)
protected final void reset(int type, int lineNr, int colNr)
public static JsonReadContext createRootContext(int lineNr, int colNr)
public static JsonReadContext createRootContext()
public final JsonReadContext createChildArrayContext(int lineNr, int colNr)
public final JsonReadContext createChildObjectContext(int lineNr, int colNr)
public final String getCurrentName()
JsonStreamContext
FIELD_NAME
and value events that directly
follow field names; null for root level and array values.getCurrentName
in class JsonStreamContext
public final JsonReadContext getParent()
JsonStreamContext
getParent
in class JsonStreamContext
public final JsonLocation getStartLocation(Object srcRef)
public final boolean expectComma()
public void setCurrentName(String name)