Class Jackson2JsonEncoder

All Implemented Interfaces:
Encoder<Object>, HttpMessageEncoder<Object>

@Deprecated(since="7.0", forRemoval=true) public class Jackson2JsonEncoder extends AbstractJackson2Encoder
Deprecated, for removal: This API element is subject to removal in a future version.
since 7.0 in favor of JacksonJsonEncoder
Encode from an Object stream to a byte stream of JsON objects using Jackson 2.x. For non-streaming use cases, Flux elements are collected into a List before serialization for performance reason.
since:
5.0
Author:
sebastien Deleuze, Arjen Poutsma
see Also:
  • Constructor Details

    • Jackson2JsonEncoder

      public&nbsp;Jackson2JsonEncoder()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • Jackson2JsonEncoder

      public&nbsp;Jackson2JsonEncoder(com.fasterxml.jackson.databind.ObjectMapper&nbsp;mapper, MimeType...&nbsp;mimeTypes)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getMediaTypesForProblemDetail

      protected&nbsp;List<MimeType>&nbsp;getMediaTypesForProblemDetail()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class:&nbsp;Jackson2Codecsupport
      Return the supported media type(s) for ProblemDetail. By default, an empty list, unless overridden in subclasses.
      Overrides:
      getMediaTypesForProblemDetail&nbsp;in class&nbsp;Jackson2Codecsupport
    • customizeWriter

      protected&nbsp;com.fasterxml.jackson.databind.ObjectWriter&nbsp;customizeWriter(com.fasterxml.jackson.databind.ObjectWriter&nbsp;writer, @Nullable MimeType&nbsp;mimeType, ResolvableType&nbsp;elementType, @Nullable Map<string,Object>&nbsp;hints)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class:&nbsp;AbstractJackson2Encoder
      subclasses can use this method to customize the ObjectWriter used for writing values.
      Overrides:
      customizeWriter&nbsp;in class&nbsp;AbstractJackson2Encoder
      Parameters:
      writer - the writer instance to customize
      mimeType - the selected MIME type
      elementType - the type of element values to write
      hints - a map with serialization hints; the Reactor Context, when available, may be accessed under the key ContextView.class.getName()
      Returns:
      the customized ObjectWriter to use