Class JacksonAdapterFactory

java.lang.Object
com.github.mizosoft.methanol.adapter.jackson.JacksonAdapterFactory

public class JacksonAdapterFactory extends Object
Provides BodyAdapter implementations for the Jackson library.
  • Method Details

    • createEncoder

      @Deprecated public static BodyAdapter.Encoder createEncoder()
      Deprecated.
      Returns an Encoder that uses a default ObjectMapper for JSON and is only compatible with application/json.
    • createEncoder

      @Deprecated public static BodyAdapter.Encoder createEncoder(com.fasterxml.jackson.databind.ObjectMapper mapper)
      Returns an Encoder that uses the given ObjectMapper and is only compatible with application/json.
    • createJsonEncoder

      public static BodyAdapter.Encoder createJsonEncoder()
      Returns an Encoder that uses a default ObjectMapper for JSON and is only compatible with application/json.
    • createJsonEncoder

      public static BodyAdapter.Encoder createJsonEncoder(com.fasterxml.jackson.databind.ObjectMapper mapper)
      Returns an Encoder that uses the given ObjectMapper and is only compatible with application/json.
    • createEncoder

      public static BodyAdapter.Encoder createEncoder(com.fasterxml.jackson.databind.ObjectMapper mapper, MediaType firstMediaType, MediaType... otherMediaTypes)
      Returns an Encoder that uses the given ObjectMapper and is compatible with the given media types.
    • createEncoder

      public static BodyAdapter.Encoder createEncoder(com.fasterxml.jackson.databind.ObjectMapper mapper, ObjectWriterFactory writerFactory, MediaType firstMediaType, MediaType... otherMediaTypes)
      Returns an Encoder that uses the given ObjectMapper and is compatible with the given media types. The encoder creates ObjectWriters using the given factory.
    • createDecoder

      @Deprecated public static BodyAdapter.Decoder createDecoder()
      Deprecated.
      Returns a Decoder that uses a default ObjectMapper for JSON and is only compatible with application/json.
    • createDecoder

      @Deprecated public static BodyAdapter.Decoder createDecoder(com.fasterxml.jackson.databind.ObjectMapper mapper)
      Returns a Decoder that uses the given ObjectMapper and is only compatible with application/json.
    • createJsonDecoder

      public static BodyAdapter.Decoder createJsonDecoder()
      Returns a Decoder that uses a default ObjectMapper for JSON and is only compatible with application/json.
    • createJsonDecoder

      public static BodyAdapter.Decoder createJsonDecoder(com.fasterxml.jackson.databind.ObjectMapper mapper)
      Returns a Decoder that uses the given ObjectMapper and is only compatible with application/json.
    • createDecoder

      public static BodyAdapter.Decoder createDecoder(com.fasterxml.jackson.databind.ObjectMapper mapper, MediaType firstMediaType, MediaType... otherMediaTypes)
      Returns a Decoder that uses the given ObjectMapper and is compatible with the given media types.
    • createDecoder

      public static BodyAdapter.Decoder createDecoder(com.fasterxml.jackson.databind.ObjectMapper mapper, ObjectReaderFactory readerFactory, MediaType firstMediaType, MediaType... otherMediaTypes)
      Returns a Decoder that uses the given ObjectMapper and is compatible with the given media types. The decoder creates ObjectReaders using the given factory.