Class JacksonDatabindMapper

java.lang.Object
io.micronaut.jackson.databind.JacksonDatabindMapper
All Implemented Interfaces:
io.micronaut.json.JsonMapper

@Internal @Singleton public final class JacksonDatabindMapper extends Object implements io.micronaut.json.JsonMapper
jackson-databind implementation of JsonMapper.
Since:
3.1
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    JacksonDatabindMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull io.micronaut.json.JsonMapper
    cloneWithFeatures(@NonNull io.micronaut.json.JsonFeatures features)
     
    @NonNull io.micronaut.json.JsonMapper
    cloneWithViewClass(@NonNull Class<?> viewClass)
     
    @NonNull org.reactivestreams.Processor<byte[],io.micronaut.json.tree.JsonNode>
    createReactiveParser(@NonNull Consumer<org.reactivestreams.Processor<byte[],io.micronaut.json.tree.JsonNode>> onSubscribe, boolean streamArray)
     
    io.micronaut.json.JsonMapper
    createSpecific(io.micronaut.core.type.Argument<?> type)
     
    @NonNull Optional<io.micronaut.json.JsonFeatures>
    detectFeatures(@NonNull io.micronaut.core.annotation.AnnotationMetadata annotations)
     
    com.fasterxml.jackson.databind.ObjectMapper
     
    @NonNull io.micronaut.json.JsonStreamConfig
     
    <T> T
    readValue(@io.micronaut.core.annotation.NonNull byte[] byteArray, @NonNull io.micronaut.core.type.Argument<T> type)
     
    <T> T
    readValue(@NonNull InputStream inputStream, @NonNull io.micronaut.core.type.Argument<T> type)
     
    <T> T
    readValue(io.micronaut.core.io.buffer.ByteBuffer<?> byteBuffer, io.micronaut.core.type.Argument<T> type)
     
    <T> T
    readValueFromTree(@NonNull io.micronaut.json.tree.JsonNode tree, @NonNull io.micronaut.core.type.Argument<T> type)
     
    void
    updateValueFromTree(Object value, @NonNull io.micronaut.json.tree.JsonNode tree)
     
    <T> void
    writeValue(@NonNull OutputStream outputStream, @NonNull io.micronaut.core.type.Argument<T> type, T object)
     
    void
    writeValue(@NonNull OutputStream outputStream, @Nullable Object object)
     
    <T> byte[]
    writeValueAsBytes(@NonNull io.micronaut.core.type.Argument<T> type, T object)
     
    byte[]
    writeValueAsBytes(@Nullable Object object)
     
    <T> @NonNull io.micronaut.json.tree.JsonNode
    writeValueToTree(@NonNull io.micronaut.core.type.Argument<T> type, T value)
     
    @NonNull io.micronaut.json.tree.JsonNode
    writeValueToTree(@Nullable Object value)
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface io.micronaut.json.JsonMapper

    readValue, readValue, readValue, readValue, readValueFromTree, writeValueAsString, writeValueAsString, writeValueAsString
  • Constructor Details

    • JacksonDatabindMapper

      @Inject @Internal public JacksonDatabindMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • JacksonDatabindMapper

      @Internal public JacksonDatabindMapper()
  • Method Details

    • getObjectMapper

      @Internal public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
    • createSpecific

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

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

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

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

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

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

      public <T> 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(@NonNull @NonNull OutputStream outputStream, @Nullable @Nullable Object object) throws IOException
      Specified by:
      writeValue in interface io.micronaut.json.JsonMapper
      Throws:
      IOException
    • writeValue

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

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

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

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

      @NonNull public @NonNull io.micronaut.json.JsonMapper cloneWithFeatures(@NonNull @NonNull io.micronaut.json.JsonFeatures features)
      Specified by:
      cloneWithFeatures in interface io.micronaut.json.JsonMapper
    • cloneWithViewClass

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

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

      @NonNull public @NonNull org.reactivestreams.Processor<byte[],io.micronaut.json.tree.JsonNode> createReactiveParser(@NonNull @NonNull Consumer<org.reactivestreams.Processor<byte[],io.micronaut.json.tree.JsonNode>> onSubscribe, boolean streamArray)
      Specified by:
      createReactiveParser in interface io.micronaut.json.JsonMapper
    • detectFeatures

      @NonNull public @NonNull Optional<io.micronaut.json.JsonFeatures> detectFeatures(@NonNull @NonNull io.micronaut.core.annotation.AnnotationMetadata annotations)
      Specified by:
      detectFeatures in interface io.micronaut.json.JsonMapper