com.fasterxml.jackson.core.json

## Class JsonReadContext

- java.lang.Object
- - com.fasterxml.jackson.core.JsonStreamContext
  - - com.fasterxml.jackson.core.json.JsonReadContext

    public final class JsonReadContext
    extends JsonStreamContext

Extension of `JsonStreamContext`, which implements core methods needed, and also exposes more complete API to parser implementation classes.

### Field Summary

Fields
`protected JsonReadContext` `_child`
`protected int` `_columnNr`
`protected String` `_currentName`
`protected int` `_lineNr`
`protected JsonReadContext` `_parent`

### Fields inherited from class com.fasterxml.jackson.core.JsonStreamContext

`_index, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT`

### Constructor Summary

Constructors
Constructor and Description
`JsonReadContext(JsonReadContext parent, int type, int lineNr, int colNr)`

### Method Summary

Methods
`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.

### Methods inherited from class com.fasterxml.jackson.core.JsonStreamContext

`getCurrentIndex, getEntryCount, getTypeDesc, inArray, inObject, inRoot`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### _parent

    protected final JsonReadContext _parent

#### _lineNr

    protected int _lineNr

#### _columnNr

    protected int _columnNr

#### _currentName

    protected String _currentName

#### _child

    protected JsonReadContext _child

### Constructor Detail

#### JsonReadContext

    public JsonReadContext(JsonReadContext parent,
                   int type,
                   int lineNr,
                   int colNr)

### Method Detail

#### reset

    protected void reset(int type,
             int lineNr,
             int colNr)

#### createRootContext

    public static JsonReadContext createRootContext(int lineNr,
                                    int colNr)

#### createRootContext

    public static JsonReadContext createRootContext()

#### createChildArrayContext

    public JsonReadContext createChildArrayContext(int lineNr,
                                          int colNr)

#### createChildObjectContext

    public JsonReadContext createChildObjectContext(int lineNr,
                                           int colNr)

#### getCurrentName

    public String getCurrentName()

Description copied from class: `JsonStreamContext`
Method for accessing name associated with the current location. Non-null for `FIELD_NAME` and value events that directly follow field names; null for root level and array values.

Specified by:
  `getCurrentName` in class `JsonStreamContext`

#### getParent

    public JsonReadContext getParent()

Description copied from class: `JsonStreamContext`
Accessor for finding parent context of this context; will return null for root context.

Specified by:
  `getParent` in class `JsonStreamContext`

#### getStartLocation

    public JsonLocation getStartLocation(Object srcRef)

Returns:
  Location pointing to the point where the context start marker was found

#### expectComma

    public boolean expectComma()

#### setCurrentName

    public void setCurrentName(String name)

#### toString

    public String toString()

Overridden to provide developer readable "JsonPath" representation of the context.

Overrides:
  `toString` in class `Object`