public class Jackson2JsonDecoder extends AbstractJackson2Codec implements Decoder<Object>
Jackson2JsonEncoderJSON_MIME_TYPES, mapper| Constructor and Description |
|---|
Jackson2JsonDecoder() |
Jackson2JsonDecoder(ObjectMapper mapper) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDecode(ResolvableType elementType,
MimeType mimeType,
Object... hints)
Whether the decoder supports the given target element type and the MIME
type of the source stream.
|
reactor.core.publisher.Flux<Object> |
decode(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
Object... hints)
Decode a
DataBuffer input stream into a Flux of T. |
reactor.core.publisher.Mono<Object> |
decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
Object... hints)
Decode a
DataBuffer input stream into a Mono of T. |
List<MimeType> |
getDecodableMimeTypes()
Return the list of MIME types this decoder supports.
|
getJavaTypepublic Jackson2JsonDecoder()
public Jackson2JsonDecoder(ObjectMapper mapper)
public boolean canDecode(ResolvableType elementType, MimeType mimeType, Object... hints)
Decoderpublic List<MimeType> getDecodableMimeTypes()
DecodergetDecodableMimeTypes in interface Decoder<Object>public reactor.core.publisher.Flux<Object> decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Object... hints)
DecoderDataBuffer input stream into a Flux of T.decode in interface Decoder<Object>inputStream - the DataBuffer input stream to decodeelementType - the expected type of elements in the output stream;
this type must have been previously passed to the Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType, java.lang.Object...)
method and it must have returned true.mimeType - the MIME type associated with the input stream, optionalhints - additional information about how to do decode, optionalpublic reactor.core.publisher.Mono<Object> decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Object... hints)
DecoderDataBuffer input stream into a Mono of T.decodeToMono in interface Decoder<Object>inputStream - the DataBuffer input stream to decodeelementType - the expected type of elements in the output stream;
this type must have been previously passed to the Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType, java.lang.Object...)
method and it must have returned true.mimeType - the MIME type associated with the input stream, optionalhints - additional information about how to do decode, optional