| Modifier and Type | Method and Description |
|---|---|
static JsonNodeDecoder |
create(io.micronaut.json.tree.JsonNode node) |
java.io.IOException |
createDeserializationException(java.lang.String message,
java.lang.Object invalidValue)
Creates an exception for the given message.
|
java.lang.Object |
decodeArbitrary()
Decodes the current state into an arbitrary object.
|
Decoder |
decodeArray(io.micronaut.core.type.Argument<?> type)
Start decoding an array.
|
java.math.BigDecimal |
decodeBigDecimal()
Decodes a BigDecimal.
|
java.math.BigInteger |
decodeBigInteger()
Decodes a BigInteger.
|
boolean |
decodeBoolean()
Decodes a boolean.
|
Decoder |
decodeBuffer()
Buffer the whole subtree of this value and return it as a new
Decoder. |
byte |
decodeByte()
Decodes a byte.
|
char |
decodeChar()
Decodes a char.
|
double |
decodeDouble()
Decodes a double.
|
float |
decodeFloat()
Decodes a float.
|
int |
decodeInt()
Decodes a int.
|
long |
decodeLong()
Decodes a long.
|
boolean |
decodeNull()
Attempt to decode a null value.
|
Decoder |
decodeObject(io.micronaut.core.type.Argument<?> type)
Decodes an object.
|
short |
decodeShort()
Decodes a short.
|
java.lang.String |
decodeString()
Decodes a string.
|
protected abstract io.micronaut.json.tree.JsonNode |
peekValue() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, decodeArray, decodeKey, decodeObject, finishStructure, hasNextArrayValue, skipValuepublic static JsonNodeDecoder create(io.micronaut.json.tree.JsonNode node)
protected abstract io.micronaut.json.tree.JsonNode peekValue()
public Decoder decodeArray(io.micronaut.core.type.Argument<?> type) throws java.io.IOException
DecoderdecodeArray in interface Decodertype - The array typejava.io.IOException - If an unrecoverable error occurspublic Decoder decodeObject(io.micronaut.core.type.Argument<?> type) throws java.io.IOException
DecoderdecodeObject in interface Decodertype - The type, never nulljava.io.IOException - If an unrecoverable error occurspublic java.lang.String decodeString()
throws java.io.IOException
DecoderdecodeString in interface Decodernulljava.io.IOException - If an unrecoverable error occurspublic boolean decodeBoolean()
throws java.io.IOException
DecoderdecodeBoolean in interface Decoderjava.io.IOException - If an unrecoverable error occurspublic byte decodeByte()
throws java.io.IOException
DecoderdecodeByte in interface Decoderjava.io.IOException - If an unrecoverable error occurspublic short decodeShort()
throws java.io.IOException
DecoderdecodeShort in interface Decoderjava.io.IOException - If an unrecoverable error occurspublic char decodeChar()
throws java.io.IOException
DecoderdecodeChar in interface Decoderjava.io.IOException - If an unrecoverable error occurspublic int decodeInt()
throws java.io.IOException
Decoderpublic long decodeLong()
throws java.io.IOException
DecoderdecodeLong in interface Decoderjava.io.IOException - If an unrecoverable error occurspublic float decodeFloat()
throws java.io.IOException
DecoderdecodeFloat in interface Decoderjava.io.IOException - If an unrecoverable error occurspublic double decodeDouble()
throws java.io.IOException
DecoderdecodeDouble in interface Decoderjava.io.IOException - If an unrecoverable error occurspublic java.math.BigInteger decodeBigInteger()
throws java.io.IOException
DecoderdecodeBigInteger in interface Decodernulljava.io.IOException - If an unrecoverable error occurspublic java.math.BigDecimal decodeBigDecimal()
throws java.io.IOException
DecoderdecodeBigDecimal in interface Decodernulljava.io.IOException - If an unrecoverable error occurspublic boolean decodeNull()
throws java.io.IOException
Decoderfalse if this value is not null, and another method should be
used for decoding. Returns true if this value was null, and the cursor has been advanced to the next
value.decodeNull in interface Decodertrue if the value was nulljava.io.IOException - If an unrecoverable error occurspublic java.lang.Object decodeArbitrary()
throws java.io.IOException
DecoderThe following should be decoded by this method:
MapListdecodeArbitrary in interface Decoderjava.io.IOException - If an unrecoverable error occurspublic Decoder decodeBuffer() throws java.io.IOException
DecoderDecoder. The returned Decoder can
be used independently to this Decoder. This means actual parsing of the subtree can be delayed.
The returned Decoder should behave identically to this Decoder. This means that for example
decoder.decodeDouble() should be equivalent to decoder.decodeBuffer().decodeDouble().
decodeBuffer in interface Decoderjava.io.IOException - If an unrecoverable error occurspublic java.io.IOException createDeserializationException(java.lang.String message,
java.lang.Object invalidValue)
DecodercreateDeserializationException in interface Decodermessage - The message, never nullinvalidValue - The invalid value. Can be null.null