public class Jackson2JsonDecoder extends AbstractJackson2Codec implements Decoder<Object>
Jackson2JsonEncoder
JSON_MIME_TYPES, JSON_VIEW_HINT, mapper
Constructor and Description |
---|
Jackson2JsonDecoder() |
Jackson2JsonDecoder(ObjectMapper mapper) |
Modifier and Type | Method and Description |
---|---|
boolean |
canDecode(ResolvableType elementType,
MimeType mimeType)
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,
Map<String,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,
Map<String,Object> hints)
Decode a
DataBuffer input stream into a Mono of T . |
List<MimeType> |
getDecodableMimeTypes()
Return the list of MIME types this decoder supports.
|
getJavaType
public Jackson2JsonDecoder()
public Jackson2JsonDecoder(ObjectMapper mapper)
public boolean canDecode(ResolvableType elementType, MimeType mimeType)
Decoder
public List<MimeType> getDecodableMimeTypes()
Decoder
getDecodableMimeTypes
in interface Decoder<Object>
public reactor.core.publisher.Flux<Object> decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Decoder
DataBuffer
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)
method and it must have returned true
.mimeType
- the MIME type associated with the input stream, optionalhints
- additional information about how to do encodepublic reactor.core.publisher.Mono<Object> decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Decoder
DataBuffer
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)
method and it must have returned true
.mimeType
- the MIME type associated with the input stream, optionalhints
- additional information about how to do encode