Class JacksonJsonMapper

java.lang.Object
io.micronaut.serde.jackson.JacksonJsonMapper
All Implemented Interfaces:
io.micronaut.json.JsonMapper, JacksonObjectMapper, io.micronaut.serde.ObjectMapper

@Internal @Singleton @Primary public final class JacksonJsonMapper extends Object implements JacksonObjectMapper
Implementation of the JsonMapper interface for Jackson.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.micronaut.serde.ObjectMapper

    io.micronaut.serde.ObjectMapper.CloseableObjectMapper
  • Constructor Summary

    Constructors
    Constructor
    Description
    JacksonJsonMapper(io.micronaut.serde.SerdeRegistry registry, io.micronaut.serde.config.SerdeConfiguration serdeConfiguration, SerdeJacksonConfiguration jacksonConfiguration)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.micronaut.serde.ObjectMapper
    cloneWithConfiguration(@Nullable io.micronaut.serde.config.SerdeConfiguration configuration, @Nullable io.micronaut.serde.config.SerializationConfiguration serializationConfiguration, @Nullable io.micronaut.serde.config.DeserializationConfiguration deserializationConfiguration)
     
    io.micronaut.serde.ObjectMapper
    cloneWithConfiguration(@Nullable io.micronaut.serde.config.SerdeConfiguration configuration, @Nullable io.micronaut.serde.config.SerializationConfiguration serializationConfiguration, @Nullable io.micronaut.serde.config.DeserializationConfiguration deserializationConfiguration, @Nullable io.micronaut.serde.SerdeIntrospections introspections)
     
    Create a new JacksonObjectMapper with the given configuration.
    io.micronaut.json.JsonMapper
    cloneWithViewClass(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.JsonMapper
    createSpecific(io.micronaut.core.type.Argument<?> type)
     
    io.micronaut.serde.SerdeRegistry
     
    io.micronaut.json.JsonStreamConfig
     
    <T> @Nullable T
    readValue(byte[] byteArray, io.micronaut.core.type.Argument<T> type)
     
    <T> @Nullable T
    readValue(io.micronaut.core.io.buffer.ByteBuffer<?> byteBuffer, io.micronaut.core.type.Argument<T> type)
     
    <T> @Nullable T
    readValue(InputStream inputStream, io.micronaut.core.type.Argument<T> type)
     
    <T> @Nullable T
    readValueFromTree(io.micronaut.json.tree.JsonNode tree, io.micronaut.core.type.Argument<T> type)
     
    <T> T
    updateValue(T valueToUpdate, io.micronaut.core.type.Argument<T> type, byte[] byteArray)
     
    <T> T
    updateValue(T valueToUpdate, io.micronaut.core.type.Argument<T> type, io.micronaut.core.io.buffer.ByteBuffer<?> byteBuffer)
     
    <T> T
    updateValue(T valueToUpdate, io.micronaut.core.type.Argument<T> type, InputStream inputStream)
     
    <T> T
    updateValue(T valueToUpdate, io.micronaut.core.type.Argument<T> type, @Nullable Object overrides)
     
    <T> T
    updateValue(T valueToUpdate, @Nullable Object overrides)
     
    void
    updateValueFromTree(Object value, io.micronaut.json.tree.JsonNode tree)
     
    <T> void
    writeValue(OutputStream outputStream, io.micronaut.core.type.Argument<T> type, @Nullable T object)
     
    void
    writeValue(OutputStream outputStream, @Nullable Object object)
     
    <T> byte[]
    writeValueAsBytes(io.micronaut.core.type.Argument<T> type, @Nullable T object)
     
    byte[]
    writeValueAsBytes(@Nullable Object object)
     
    <T> io.micronaut.json.tree.JsonNode
    writeValueToTree(io.micronaut.core.type.Argument<T> type, @Nullable T value)
     
    io.micronaut.json.tree.JsonNode
    writeValueToTree(@Nullable Object value)
     

    Methods inherited from class Object

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

    Methods inherited from interface io.micronaut.json.JsonMapper

    detectFeatures, readValue, readValue, readValue, readValue, readValue, readValueFromTree, writeValueAsString, writeValueAsString, writeValueAsString

    Methods inherited from interface io.micronaut.serde.ObjectMapper

    cloneWithFeatures
  • Constructor Details

    • JacksonJsonMapper

      @Inject @Internal public JacksonJsonMapper(io.micronaut.serde.SerdeRegistry registry, io.micronaut.serde.config.SerdeConfiguration serdeConfiguration, SerdeJacksonConfiguration jacksonConfiguration)
  • Method Details

    • getSerdeRegistry

      public io.micronaut.serde.SerdeRegistry getSerdeRegistry()
      Specified by:
      getSerdeRegistry in interface io.micronaut.serde.ObjectMapper
    • createSpecific

      public io.micronaut.json.JsonMapper createSpecific(io.micronaut.core.type.Argument<?> type)
      Specified by:
      createSpecific in interface io.micronaut.json.JsonMapper
    • cloneWithConfiguration

      public io.micronaut.serde.ObjectMapper cloneWithConfiguration(@Nullable io.micronaut.serde.config.SerdeConfiguration configuration, @Nullable io.micronaut.serde.config.SerializationConfiguration serializationConfiguration, @Nullable io.micronaut.serde.config.DeserializationConfiguration deserializationConfiguration)
      Specified by:
      cloneWithConfiguration in interface io.micronaut.serde.ObjectMapper
    • cloneWithConfiguration

      public io.micronaut.serde.ObjectMapper cloneWithConfiguration(@Nullable io.micronaut.serde.config.SerdeConfiguration configuration, @Nullable io.micronaut.serde.config.SerializationConfiguration serializationConfiguration, @Nullable io.micronaut.serde.config.DeserializationConfiguration deserializationConfiguration, @Nullable io.micronaut.serde.SerdeIntrospections introspections)
      Specified by:
      cloneWithConfiguration in interface io.micronaut.serde.ObjectMapper
    • cloneWithConfiguration

      public JacksonObjectMapper cloneWithConfiguration(SerdeJacksonConfiguration jacksonConfiguration)
      Description copied from interface: JacksonObjectMapper
      Create a new JacksonObjectMapper with the given configuration.
      Specified by:
      cloneWithConfiguration in interface JacksonObjectMapper
      Parameters:
      jacksonConfiguration - The SerdeJacksonConfiguration
      Returns:
      A new JacksonObjectMapper with the updated config
    • readValueFromTree

      public <T> @Nullable T readValueFromTree(io.micronaut.json.tree.JsonNode tree, io.micronaut.core.type.Argument<T> type) throws IOException
      Specified by:
      readValueFromTree in interface io.micronaut.json.JsonMapper
      Throws:
      IOException
    • writeValueToTree

      public io.micronaut.json.tree.JsonNode writeValueToTree(@Nullable Object value) throws IOException
      Specified by:
      writeValueToTree in interface io.micronaut.json.JsonMapper
      Throws:
      IOException
    • writeValueToTree

      public <T> io.micronaut.json.tree.JsonNode writeValueToTree(io.micronaut.core.type.Argument<T> type, @Nullable T value) throws IOException
      Specified by:
      writeValueToTree in interface io.micronaut.json.JsonMapper
      Throws:
      IOException
    • readValue

      public <T> @Nullable T readValue(InputStream inputStream, io.micronaut.core.type.Argument<T> type) throws IOException
      Specified by:
      readValue in interface io.micronaut.json.JsonMapper
      Throws:
      IOException
    • readValue

      public <T> @Nullable T readValue(byte[] byteArray, io.micronaut.core.type.Argument<T> type) throws IOException
      Specified by:
      readValue in interface io.micronaut.json.JsonMapper
      Throws:
      IOException
    • readValue

      public <T> @Nullable T readValue(io.micronaut.core.io.buffer.ByteBuffer<?> byteBuffer, io.micronaut.core.type.Argument<T> type) throws IOException
      Specified by:
      readValue in interface io.micronaut.json.JsonMapper
      Throws:
      IOException
    • writeValue

      public void writeValue(OutputStream outputStream, @Nullable Object object) throws IOException
      Specified by:
      writeValue in interface io.micronaut.json.JsonMapper
      Throws:
      IOException
    • writeValue

      public <T> void writeValue(OutputStream outputStream, io.micronaut.core.type.Argument<T> type, @Nullable T object) throws IOException
      Specified by:
      writeValue in interface io.micronaut.json.JsonMapper
      Throws:
      IOException
    • writeValueAsBytes

      public byte[] writeValueAsBytes(@Nullable Object object) throws IOException
      Specified by:
      writeValueAsBytes in interface io.micronaut.json.JsonMapper
      Throws:
      IOException
    • writeValueAsBytes

      public <T> byte[] writeValueAsBytes(io.micronaut.core.type.Argument<T> type, @Nullable T object) throws IOException
      Specified by:
      writeValueAsBytes in interface io.micronaut.json.JsonMapper
      Throws:
      IOException
    • getStreamConfig

      public io.micronaut.json.JsonStreamConfig getStreamConfig()
      Specified by:
      getStreamConfig in interface io.micronaut.json.JsonMapper
    • createReactiveParser

      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:
      createReactiveParser in interface io.micronaut.json.JsonMapper
    • cloneWithViewClass

      public io.micronaut.json.JsonMapper cloneWithViewClass(Class<?> viewClass)
      Specified by:
      cloneWithViewClass in interface io.micronaut.json.JsonMapper
    • updateValueFromTree

      public void updateValueFromTree(Object value, io.micronaut.json.tree.JsonNode tree) throws IOException
      Specified by:
      updateValueFromTree in interface io.micronaut.json.JsonMapper
      Throws:
      IOException
    • updateValue

      public <T> T updateValue(T valueToUpdate, @Nullable Object overrides) throws IOException
      Specified by:
      updateValue in interface io.micronaut.serde.ObjectMapper
      Throws:
      IOException
    • updateValue

      public <T> T updateValue(T valueToUpdate, io.micronaut.core.type.Argument<T> type, @Nullable Object overrides) throws IOException
      Specified by:
      updateValue in interface io.micronaut.serde.ObjectMapper
      Throws:
      IOException
    • updateValue

      public <T> T updateValue(T valueToUpdate, io.micronaut.core.type.Argument<T> type, InputStream inputStream) throws IOException
      Specified by:
      updateValue in interface io.micronaut.serde.ObjectMapper
      Throws:
      IOException
    • updateValue

      public <T> T updateValue(T valueToUpdate, io.micronaut.core.type.Argument<T> type, byte[] byteArray) throws IOException
      Specified by:
      updateValue in interface io.micronaut.serde.ObjectMapper
      Throws:
      IOException
    • updateValue

      public <T> T updateValue(T valueToUpdate, io.micronaut.core.type.Argument<T> type, io.micronaut.core.io.buffer.ByteBuffer<?> byteBuffer) throws IOException
      Specified by:
      updateValue in interface io.micronaut.serde.ObjectMapper
      Throws:
      IOException