Class SimpleValueReader

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

public class SimpleValueReader extends ValueReader
Default ValueReader used for simple scalar types and related, not including POJO-, Map and Collection types.
  • Field Details

    • _typeId

      protected final int _typeId
  • Constructor Details

    • SimpleValueReader

      public SimpleValueReader(Class<?> raw, int typeId)
  • Method Details

    • readNext

      public Object readNext(JSONReader reader, 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:
      reader - 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 reader, 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:
      reader - 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
    • _readBinary

      protected byte[] _readBinary(com.fasterxml.jackson.core.JsonParser p) throws IOException
      Throws:
      IOException
    • _readPath

      protected Path _readPath(com.fasterxml.jackson.core.JsonParser p) throws IOException
      Throws:
      IOException
    • _readIntArray

      protected int[] _readIntArray(com.fasterxml.jackson.core.JsonParser p) throws IOException
      Throws:
      IOException
    • _readLongArray

      protected long[] _readLongArray(com.fasterxml.jackson.core.JsonParser p) throws IOException
      Throws:
      IOException
    • _fetchLong

      protected long _fetchLong(com.fasterxml.jackson.core.JsonParser p) throws IOException
      Throws:
      IOException
    • _readDoubleArray

      protected double[] _readDoubleArray(com.fasterxml.jackson.core.JsonParser p) throws IOException
      Throws:
      IOException
    • _readBooleanArray

      protected boolean[] _readBooleanArray(com.fasterxml.jackson.core.JsonParser p) throws IOException
      Throws:
      IOException
    • _readShortArray

      protected short[] _readShortArray(com.fasterxml.jackson.core.JsonParser p) throws IOException
      Throws:
      IOException
    • _readFloatArray

      protected float[] _readFloatArray(com.fasterxml.jackson.core.JsonParser p) throws IOException
      Throws:
      IOException