Class MapReader

java.lang.Object
com.fasterxml.jackson.jr.ob.api.ValueReader
com.fasterxml.jackson.jr.ob.impl.MapReader

public class MapReader extends ValueReader
Reader for typed Map values.
  • Field Details

    • _mapType

      protected final Class<?> _mapType
    • _valueReader

      protected final ValueReader _valueReader
  • Constructor Details

  • Method Details

    • readNext

      public Object readNext(JSONReader r, com.fasterxml.jackson.core.JsonParser p) throws IOException
      Description copied from class: ValueReader
      Method called to deserialize value of type supported by this reader, using given parser. Parser is not yet positioned to the (first) token of the value to read and needs to be advanced.

      Default implementation simply calls `p.nextToken()` first, then calls {#link ValueReader.read(JSONReader, JsonParser), but some implementations may decide to implement this differently to use (slightly) more efficient accessors in JsonParser, like JsonParser.nextIntValue(int).

      Overrides:
      readNext in class ValueReader
      Parameters:
      r - Context object that allows calling other read methods for contained values of different types (for example for collection readers).
      p - Underlying parser used for reading decoded token stream
      Throws:
      IOException
    • read

      public Object read(JSONReader r, com.fasterxml.jackson.core.JsonParser p) throws IOException
      Description copied from class: ValueReader
      Method called to deserialize value of type supported by this reader, using given parser. Parser is already positioned to the (first) token of the value to read.
      Specified by:
      read in class ValueReader
      Parameters:
      r - Context object that allows calling other read methods for contained values of different types (for example for collection readers).
      p - Underlying parser used for reading decoded token stream
      Throws:
      IOException
    • _reportProblem

      protected JSONObjectException _reportProblem(com.fasterxml.jackson.core.JsonParser p)