Package io.micronaut.serde.jackson
Class JacksonJsonMapper
java.lang.Object
io.micronaut.serde.jackson.JacksonJsonMapper
- All Implemented Interfaces:
io.micronaut.json.JsonMapper,ObjectMapper
@Internal
@Singleton
@Primary
public final class JacksonJsonMapper
extends Object
implements ObjectMapper
Implementation of the
JsonMapper interface for Jackson.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.serde.ObjectMapper
ObjectMapper.CloseableObjectMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.json.JsonMappercloneWithViewClass(Class<?> viewClass) org.reactivestreams.Processor<byte[],io.micronaut.json.tree.JsonNode> createReactiveParser(Consumer<org.reactivestreams.Processor<byte[], io.micronaut.json.tree.JsonNode>> onSubscribe, boolean streamArray) io.micronaut.json.JsonStreamConfig<T> TreadValue(byte[] byteArray, io.micronaut.core.type.Argument<T> type) <T> TreadValue(io.micronaut.core.io.buffer.ByteBuffer<?> byteBuffer, io.micronaut.core.type.Argument<T> type) <T> TreadValue(InputStream inputStream, io.micronaut.core.type.Argument<T> type) <T> TreadValueFromTree(io.micronaut.json.tree.JsonNode tree, io.micronaut.core.type.Argument<T> type) voidupdateValueFromTree(Object value, io.micronaut.json.tree.JsonNode tree) <T> voidwriteValue(OutputStream outputStream, io.micronaut.core.type.Argument<T> type, T object) voidwriteValue(OutputStream outputStream, Object object) <T> byte[]writeValueAsBytes(io.micronaut.core.type.Argument<T> type, T object) byte[]writeValueAsBytes(Object object) <T> io.micronaut.json.tree.JsonNodewriteValueToTree(io.micronaut.core.type.Argument<T> type, T value) io.micronaut.json.tree.JsonNodewriteValueToTree(Object value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.json.JsonMapper
detectFeatures, readValue, readValueFromTreeMethods inherited from interface io.micronaut.serde.ObjectMapper
cloneWithFeatures, readValue, readValue, readValue, writeValueAsString, writeValueAsString, writeValueAsString
-
Constructor Details
-
JacksonJsonMapper
-
-
Method Details
-
readValueFromTree
public <T> T readValueFromTree(@NonNull io.micronaut.json.tree.JsonNode tree, @NonNull io.micronaut.core.type.Argument<T> type) throws IOException - Specified by:
readValueFromTreein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
writeValueToTree
@NonNull public io.micronaut.json.tree.JsonNode writeValueToTree(@Nullable Object value) throws IOException - Specified by:
writeValueToTreein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
writeValueToTree
public <T> io.micronaut.json.tree.JsonNode writeValueToTree(io.micronaut.core.type.Argument<T> type, T value) throws IOException - Specified by:
writeValueToTreein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
readValue
public <T> T readValue(@NonNull InputStream inputStream, @NonNull io.micronaut.core.type.Argument<T> type) throws IOException - Specified by:
readValuein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
readValue
public <T> T readValue(@NonNull byte[] byteArray, @NonNull io.micronaut.core.type.Argument<T> type) throws IOException - Specified by:
readValuein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
readValue
public <T> T readValue(@NonNull io.micronaut.core.io.buffer.ByteBuffer<?> byteBuffer, @NonNull io.micronaut.core.type.Argument<T> type) throws IOException - Specified by:
readValuein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
writeValue
public void writeValue(@NonNull OutputStream outputStream, @Nullable Object object) throws IOException - Specified by:
writeValuein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
writeValue
public <T> void writeValue(OutputStream outputStream, io.micronaut.core.type.Argument<T> type, T object) throws IOException - Specified by:
writeValuein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
writeValueAsBytes
- Specified by:
writeValueAsBytesin interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
writeValueAsBytes
public <T> byte[] writeValueAsBytes(io.micronaut.core.type.Argument<T> type, T object) throws IOException - Specified by:
writeValueAsBytesin interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
getStreamConfig
@NonNull public io.micronaut.json.JsonStreamConfig getStreamConfig()- Specified by:
getStreamConfigin interfaceio.micronaut.json.JsonMapper
-
createReactiveParser
@NonNull public org.reactivestreams.Processor<byte[],io.micronaut.json.tree.JsonNode> createReactiveParser(Consumer<org.reactivestreams.Processor<byte[], io.micronaut.json.tree.JsonNode>> onSubscribe, boolean streamArray) - Specified by:
createReactiveParserin interfaceio.micronaut.json.JsonMapper
-
cloneWithViewClass
- Specified by:
cloneWithViewClassin interfaceio.micronaut.json.JsonMapper
-
updateValueFromTree
public void updateValueFromTree(Object value, io.micronaut.json.tree.JsonNode tree) throws IOException - Specified by:
updateValueFromTreein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-