com.fasterxml.jackson.core.json

Class 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 Detail

      • _lineNr

        protected int _lineNr
      • _columnNr

        protected int _columnNr
      • _currentName

        protected String _currentName
    • 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)
      • 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
      • 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

Copyright © 2012-2014 FasterXML. All Rights Reserved.