Class JsonNodeDecoder

java.lang.Object
io.micronaut.serde.LimitingStream
io.micronaut.serde.support.util.JsonNodeDecoder
All Implemented Interfaces:
io.micronaut.serde.Decoder, AutoCloseable

@Internal public abstract sealed class JsonNodeDecoder extends io.micronaut.serde.LimitingStream implements io.micronaut.serde.Decoder
Implementation of the Decoder interface that uses the JsonNode abstraction.
  • Nested Class Summary

    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
  • Method Summary

    Modifier and Type
    Method
    Description
    create(io.micronaut.json.tree.JsonNode node, io.micronaut.serde.LimitingStream.RemainingLimits remainingLimits)
     
     
     
    io.micronaut.serde.Decoder
    decodeArray(io.micronaut.core.type.Argument<?> type)
     
     
     
    byte @NonNull []
     
    boolean
     
    io.micronaut.serde.Decoder
     
    byte
     
    char
     
    double
     
    float
     
    int
     
    long
     
    @NonNull io.micronaut.json.tree.JsonNode
     
    boolean
     
    io.micronaut.serde.Decoder
    decodeObject(io.micronaut.core.type.Argument<?> type)
     
    short
     
     
    protected abstract io.micronaut.json.tree.JsonNode
     

    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, decodeKey, decodeLongNullable, decodeObject, decodeShortNullable, decodeStringNullable, finishStructure, finishStructure, hasNextArrayValue, skipValue
  • Method Details

    • create

      public static JsonNodeDecoder create(io.micronaut.json.tree.JsonNode node, io.micronaut.serde.LimitingStream.RemainingLimits remainingLimits)
    • peekValue

      protected abstract io.micronaut.json.tree.JsonNode peekValue() throws IOException
      Throws:
      IOException
    • decodeArray

      public io.micronaut.serde.Decoder decodeArray(io.micronaut.core.type.Argument<?> type) throws IOException
      Specified by:
      decodeArray in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeObject

      public io.micronaut.serde.Decoder decodeObject(io.micronaut.core.type.Argument<?> type) throws IOException
      Specified by:
      decodeObject in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeString

      public String decodeString() throws IOException
      Specified by:
      decodeString in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeBoolean

      public boolean decodeBoolean() throws IOException
      Specified by:
      decodeBoolean in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeByte

      public byte decodeByte() throws IOException
      Specified by:
      decodeByte in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeShort

      public short decodeShort() throws IOException
      Specified by:
      decodeShort in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeChar

      public char decodeChar() throws IOException
      Specified by:
      decodeChar in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeInt

      public int decodeInt() throws IOException
      Specified by:
      decodeInt in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeLong

      public long decodeLong() throws IOException
      Specified by:
      decodeLong in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeFloat

      public float decodeFloat() throws IOException
      Specified by:
      decodeFloat in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeDouble

      public double decodeDouble() throws IOException
      Specified by:
      decodeDouble in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeBigInteger

      public BigInteger decodeBigInteger() throws IOException
      Specified by:
      decodeBigInteger in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeBigDecimal

      public BigDecimal decodeBigDecimal() throws IOException
      Specified by:
      decodeBigDecimal in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeBinary

      public byte @NonNull [] decodeBinary() throws IOException
      Specified by:
      decodeBinary in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeNull

      public boolean decodeNull() throws IOException
      Specified by:
      decodeNull in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeArbitrary

      public Object decodeArbitrary() throws IOException
      Specified by:
      decodeArbitrary in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeNode

      @NonNull public @NonNull io.micronaut.json.tree.JsonNode decodeNode() throws IOException
      Specified by:
      decodeNode in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • decodeBuffer

      public io.micronaut.serde.Decoder decodeBuffer() throws IOException
      Specified by:
      decodeBuffer in interface io.micronaut.serde.Decoder
      Throws:
      IOException
    • createDeserializationException

      public IOException createDeserializationException(String message, Object invalidValue)
      Specified by:
      createDeserializationException in interface io.micronaut.serde.Decoder