Module methanol.adapter.jackson
Class JacksonAdapterFactory
java.lang.Object
com.github.mizosoft.methanol.adapter.jackson.JacksonAdapterFactory
Provides
BodyAdapter
implementations for the Jackson library.-
Method Summary
Modifier and TypeMethodDescriptionstatic BodyAdapter.Decoder
Deprecated.static BodyAdapter.Decoder
createDecoder
(com.fasterxml.jackson.databind.ObjectMapper mapper) Deprecated.static BodyAdapter.Decoder
createDecoder
(com.fasterxml.jackson.databind.ObjectMapper mapper, ObjectReaderFactory readerFactory, MediaType firstMediaType, MediaType... otherMediaTypes) Returns aDecoder
that uses the givenObjectMapper
and is compatible with the given media types.static BodyAdapter.Decoder
createDecoder
(com.fasterxml.jackson.databind.ObjectMapper mapper, MediaType firstMediaType, MediaType... otherMediaTypes) Returns aDecoder
that uses the givenObjectMapper
and is compatible with the given media types.static BodyAdapter.Encoder
Deprecated.UsecreateJsonEncoder()
.static BodyAdapter.Encoder
createEncoder
(com.fasterxml.jackson.databind.ObjectMapper mapper) Deprecated.static BodyAdapter.Encoder
createEncoder
(com.fasterxml.jackson.databind.ObjectMapper mapper, ObjectWriterFactory writerFactory, MediaType firstMediaType, MediaType... otherMediaTypes) Returns anEncoder
that uses the givenObjectMapper
and is compatible with the given media types.static BodyAdapter.Encoder
createEncoder
(com.fasterxml.jackson.databind.ObjectMapper mapper, MediaType firstMediaType, MediaType... otherMediaTypes) Returns anEncoder
that uses the givenObjectMapper
and is compatible with the given media types.static BodyAdapter.Decoder
Returns aDecoder
that uses a defaultObjectMapper
for JSON and is only compatible withapplication/json
.static BodyAdapter.Decoder
createJsonDecoder
(com.fasterxml.jackson.databind.ObjectMapper mapper) Returns aDecoder
that uses the givenObjectMapper
and is only compatible withapplication/json
.static BodyAdapter.Encoder
Returns anEncoder
that uses a defaultObjectMapper
for JSON and is only compatible withapplication/json
.static BodyAdapter.Encoder
createJsonEncoder
(com.fasterxml.jackson.databind.ObjectMapper mapper) Returns anEncoder
that uses the givenObjectMapper
and is only compatible withapplication/json
.
-
Method Details
-
createEncoder
Deprecated.UsecreateJsonEncoder()
.Returns anEncoder
that uses a defaultObjectMapper
for JSON and is only compatible withapplication/json
. -
createEncoder
@Deprecated public static BodyAdapter.Encoder createEncoder(com.fasterxml.jackson.databind.ObjectMapper mapper) Deprecated.Returns anEncoder
that uses the givenObjectMapper
and is only compatible withapplication/json
. -
createJsonEncoder
Returns anEncoder
that uses a defaultObjectMapper
for JSON and is only compatible withapplication/json
. -
createJsonEncoder
public static BodyAdapter.Encoder createJsonEncoder(com.fasterxml.jackson.databind.ObjectMapper mapper) Returns anEncoder
that uses the givenObjectMapper
and is only compatible withapplication/json
. -
createEncoder
public static BodyAdapter.Encoder createEncoder(com.fasterxml.jackson.databind.ObjectMapper mapper, MediaType firstMediaType, MediaType... otherMediaTypes) Returns anEncoder
that uses the givenObjectMapper
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 anEncoder
that uses the givenObjectMapper
and is compatible with the given media types. The encoder createsObjectWriters
using the given factory. -
createDecoder
Deprecated.UsecreateJsonDecoder()
.Returns aDecoder
that uses a defaultObjectMapper
for JSON and is only compatible withapplication/json
. -
createDecoder
@Deprecated public static BodyAdapter.Decoder createDecoder(com.fasterxml.jackson.databind.ObjectMapper mapper) Deprecated.Returns aDecoder
that uses the givenObjectMapper
and is only compatible withapplication/json
. -
createJsonDecoder
Returns aDecoder
that uses a defaultObjectMapper
for JSON and is only compatible withapplication/json
. -
createJsonDecoder
public static BodyAdapter.Decoder createJsonDecoder(com.fasterxml.jackson.databind.ObjectMapper mapper) Returns aDecoder
that uses the givenObjectMapper
and is only compatible withapplication/json
. -
createDecoder
public static BodyAdapter.Decoder createDecoder(com.fasterxml.jackson.databind.ObjectMapper mapper, MediaType firstMediaType, MediaType... otherMediaTypes) Returns aDecoder
that uses the givenObjectMapper
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 aDecoder
that uses the givenObjectMapper
and is compatible with the given media types. The decoder createsObjectReaders
using the given factory.
-
createJsonDecoder()
.