Class JsonParserDecoder

java.lang.Object
io.micronaut.serde.LimitingStream
io.micronaut.serde.support.AbstractStreamDecoder
io.micronaut.serde.json.stream.JsonParserDecoder
All Implemented Interfaces:
io.micronaut.serde.Decoder, AutoCloseable

public class JsonParserDecoder extends io.micronaut.serde.support.AbstractStreamDecoder
Implementation of the Decoder interface for JSON-P.
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.micronaut.serde.support.AbstractStreamDecoder

    io.micronaut.serde.support.AbstractStreamDecoder.TokenType, io.micronaut.serde.support.AbstractStreamDecoder.ValueDecoder<R extends Object>

    Nested classes/interfaces inherited from class io.micronaut.serde.LimitingStream

    io.micronaut.serde.LimitingStream.RemainingLimits
  • Field Summary

    Fields inherited from class io.micronaut.serde.LimitingStream

    DEFAULT_LIMITS, DEFAULT_MAXIMUM_DEPTH
  • Constructor Summary

    Constructors
    Constructor
    Description
    JsonParserDecoder(jakarta.json.stream.JsonParser jsonParser)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    coerceScalarToString(io.micronaut.serde.support.AbstractStreamDecoder.TokenType currentToken)
     
     
    protected io.micronaut.serde.support.AbstractStreamDecoder.TokenType
     
    void
    finishStructure(boolean consumeLeftElements)
     
    protected Number
     
    protected BigDecimal
     
    protected BigInteger
     
    protected boolean
     
    protected String
     
    protected double
     
    protected long
     
    protected String
     
    protected void
     
    protected void
     

    Methods inherited from class io.micronaut.serde.support.AbstractStreamDecoder

    consumeLeftElements, decodeArbitrary, decodeArray, decodeArray0, decodeBigDecimal, decodeBigInteger, decodeBinary, decodeBoolean, decodeBuffer, decodeByte, decodeChar, decodeCustom, decodeCustom, decodeDouble, decodeFloat, decodeInt, decodeKey, decodeLong, decodeNode, decodeNull, decodeNumber, decodeObject, decodeObject0, decodeShort, decodeString, getBestNumberNode, getBigDecimalFromNumber, getInteger, hasNextArrayValue, preDecodeValue, skipValue, unexpectedToken

    Methods inherited from class io.micronaut.serde.LimitingStream

    childLimits, decreaseDepth, increaseDepth, limitsFromConfiguration, ourLimits

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface io.micronaut.serde.Decoder

    close, decodeArray, decodeBigDecimalNullable, decodeBigIntegerNullable, decodeBinaryNullable, decodeBooleanNullable, decodeByteNullable, decodeCharNullable, decodeDoubleNullable, decodeFloatNullable, decodeIntNullable, decodeLongNullable, decodeNumber, decodeNumberNullable, decodeObject, decodeShortNullable, decodeStringNullable, finishStructure
  • Constructor Details

    • JsonParserDecoder

      public JsonParserDecoder(jakarta.json.stream.JsonParser jsonParser)
  • Method Details

    • finishStructure

      public void finishStructure(boolean consumeLeftElements) throws IOException
      Specified by:
      finishStructure in interface io.micronaut.serde.Decoder
      Overrides:
      finishStructure in class io.micronaut.serde.support.AbstractStreamDecoder
      Throws:
      IOException
    • currentToken

      protected io.micronaut.serde.support.AbstractStreamDecoder.TokenType currentToken()
      Specified by:
      currentToken in class io.micronaut.serde.support.AbstractStreamDecoder
    • nextToken

      protected void nextToken()
      Specified by:
      nextToken in class io.micronaut.serde.support.AbstractStreamDecoder
    • getCurrentKey

      protected String getCurrentKey()
      Specified by:
      getCurrentKey in class io.micronaut.serde.support.AbstractStreamDecoder
    • coerceScalarToString

      protected String coerceScalarToString(io.micronaut.serde.support.AbstractStreamDecoder.TokenType currentToken)
      Specified by:
      coerceScalarToString in class io.micronaut.serde.support.AbstractStreamDecoder
    • getString

      protected String getString()
      Specified by:
      getString in class io.micronaut.serde.support.AbstractStreamDecoder
    • getBoolean

      protected boolean getBoolean()
      Specified by:
      getBoolean in class io.micronaut.serde.support.AbstractStreamDecoder
    • getLong

      protected long getLong()
      Specified by:
      getLong in class io.micronaut.serde.support.AbstractStreamDecoder
    • getDouble

      protected double getDouble()
      Specified by:
      getDouble in class io.micronaut.serde.support.AbstractStreamDecoder
    • getBigInteger

      protected BigInteger getBigInteger()
      Specified by:
      getBigInteger in class io.micronaut.serde.support.AbstractStreamDecoder
    • getBigDecimal

      protected BigDecimal getBigDecimal()
      Specified by:
      getBigDecimal in class io.micronaut.serde.support.AbstractStreamDecoder
    • getBestNumber

      protected Number getBestNumber()
      Specified by:
      getBestNumber in class io.micronaut.serde.support.AbstractStreamDecoder
    • skipChildren

      protected void skipChildren()
      Specified by:
      skipChildren in class io.micronaut.serde.support.AbstractStreamDecoder
    • createDeserializationException

      public IOException createDeserializationException(String message, Object invalidValue)