Class JacksonJsonDecoder

java.lang.Object
org.springframework.http.codec.JacksonCodecsupport<tools.jackson.databind.json.JsonMapper>
org.springframework.http.codec.AbstractJacksonDecoder<tools.jackson.databind.json.JsonMapper>
org.springframework.http.codec.json.JacksonJsonDecoder
All Implemented Interfaces:
Decoder<Object>, HttpMessageDecoder<Object>

public class JacksonJsonDecoder extends AbstractJacksonDecoder<tools.jackson.databind.json.JsonMapper>
Decode a byte stream into JsON and convert to Object's with Jackson 3.x leveraging non-blocking parsing.
since:
7.0
Author:
sebastien Deleuze
see Also:
  • Constructor Details

    • JacksonJsonDecoder

      public&nbsp;JacksonJsonDecoder()
      Construct a new instance with a JsonMapper customized with the JacksonModules found by MapperBuilder.findModules(ClassLoader).
    • JacksonJsonDecoder

      public&nbsp;JacksonJsonDecoder(tools.jackson.databind.json.JsonMapper.Builder&nbsp;builder)
      Construct a new instance with the provided JsonMapper.Builder customized with the JacksonModules found by MapperBuilder.findModules(ClassLoader).
      see Also:
      • JsonMapper.builder()
    • JacksonJsonDecoder

      public&nbsp;JacksonJsonDecoder(tools.jackson.databind.json.JsonMapper&nbsp;mapper)
      Construct a new instance with the provided JsonMapper.
      see Also:
      • JsonMapper.builder()
    • JacksonJsonDecoder

      public&nbsp;JacksonJsonDecoder(tools.jackson.databind.json.JsonMapper.Builder&nbsp;builder, MimeType...&nbsp;mimeTypes)
      Construct a new instance with the provided JsonMapper.Builder customized with the JacksonModules found by MapperBuilder.findModules(ClassLoader), and MimeTypes.
      see Also:
      • JsonMapper.builder()
    • JacksonJsonDecoder

      public&nbsp;JacksonJsonDecoder(tools.jackson.databind.json.JsonMapper&nbsp;mapper, MimeType...&nbsp;mimeTypes)
      Construct a new instance with the provided JsonMapper and MimeTypes.
  • Method Details

    • processInput

      protected&nbsp;reactor.core.publisher.Flux<DataBuffer>&nbsp;processInput(Publisher<DataBuffer>&nbsp;input, ResolvableType&nbsp;elementType, @Nullable MimeType&nbsp;mimeType, @Nullable Map<string,Object>&nbsp;hints)
      Description copied from class:&nbsp;AbstractJacksonDecoder
      Process the input publisher into a flux. Default implementation returns Flux.from(Publisher), but subclasses can choose to customize this behavior.
      Overrides:
      processInput&nbsp;in class&nbsp;AbstractJacksonDecoder<tools.jackson.databind.json.JsonMapper>
      Parameters:
      input - the DataBuffer input stream to process
      elementType - the expected type of elements in the output stream
      mimeType - the MIME type associated with the input stream (optional)
      hints - additional information about how to do encode
      Returns:
      the processed flux