Modifier and Type | Method and Description |
---|---|
static JsonNodeEncoder |
create()
Creates a new instance.
|
Encoder |
encodeArray(io.micronaut.core.type.Argument<?> type)
Encodes an array.
|
void |
encodeBigDecimal(java.math.BigDecimal value)
Encode a BigDecimal.
|
void |
encodeBigInteger(java.math.BigInteger value)
Encode a BigInteger.
|
void |
encodeBoolean(boolean value)
Encode a boolean.
|
void |
encodeByte(byte value)
Encode a byte.
|
void |
encodeChar(char value)
Encode a char.
|
void |
encodeDouble(double value)
Encode a double.
|
void |
encodeFloat(float value)
Encode a float.
|
void |
encodeInt(int value)
Encode an int.
|
void |
encodeLong(long value)
Encode a long.
|
void |
encodeNull()
Encode
null . |
Encoder |
encodeObject(io.micronaut.core.type.Argument<?> type)
Encodes an object.
|
void |
encodeShort(short value)
Encode a short.
|
void |
encodeString(java.lang.String value)
Encode a string.
|
protected abstract void |
encodeValue(io.micronaut.json.tree.JsonNode node)
Encode the given value.
|
io.micronaut.json.tree.JsonNode |
getCompletedValue()
Obtains the completed value.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, currentPath, encodeKey, finishStructure
@NonNull public static JsonNodeEncoder create()
JsonNodeEncoder
protected abstract void encodeValue(io.micronaut.json.tree.JsonNode node)
node
- The node to encodepublic void encodeString(java.lang.String value)
Encoder
encodeString
in interface Encoder
value
- The string, never null
public void encodeBoolean(boolean value)
Encoder
encodeBoolean
in interface Encoder
value
- The booleanpublic void encodeByte(byte value)
Encoder
encodeByte
in interface Encoder
value
- The bytepublic void encodeShort(short value)
Encoder
encodeShort
in interface Encoder
value
- The shortpublic void encodeChar(char value)
Encoder
encodeChar
in interface Encoder
value
- The charpublic void encodeInt(int value)
Encoder
public void encodeLong(long value)
Encoder
encodeLong
in interface Encoder
value
- The longpublic void encodeFloat(float value)
Encoder
encodeFloat
in interface Encoder
value
- The floatpublic void encodeDouble(double value)
Encoder
encodeDouble
in interface Encoder
value
- The doublepublic void encodeBigInteger(java.math.BigInteger value)
Encoder
encodeBigInteger
in interface Encoder
value
- The BigInteger, never null
public void encodeBigDecimal(java.math.BigDecimal value)
Encoder
encodeBigDecimal
in interface Encoder
value
- The BigDecimal, never null
public void encodeNull()
Encoder
null
.encodeNull
in interface Encoder
public Encoder encodeArray(io.micronaut.core.type.Argument<?> type)
Encoder
encodeArray
in interface Encoder
type
- The array type, never null
null
public Encoder encodeObject(io.micronaut.core.type.Argument<?> type)
Encoder
encodeObject
in interface Encoder
type
- The object type, never null
null
@NonNull public io.micronaut.json.tree.JsonNode getCompletedValue()
JsonNode