Top Description Constructors Methods
org.springframework.http.codec.cbor

public Class Jackson2CborDecoder

extends AbstractJackson2Decoder
Class Inheritance
Imports
java.util.Map, com.fasterxml.jackson.databind.ObjectMapper, com.fasterxml.jackson.dataformat.cbor.CBORFactory, org.reactivestreams.Publisher, reactor.core.publisher.Flux, org.springframework.core.ResolvableType, org.springframework.core.io.buffer.DataBuffer, org.springframework.http.MediaType, org.springframework.http.codec.json.AbstractJackson2Decoder, org.springframework.http.converter.json.Jackson2ObjectMapperBuilder, org.springframework.util.Assert, .MimeType

Decode bytes into CBOR and convert to Object's with Jackson. Stream decoding is not supported yet.
Author
Sebastien Deleuze
Since
5.2
See Also
Jackson2CborEncoder, Add CBOR support to WebFlux

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public Flux<Object>
decode(Publisher<DataBuffer>
the DataBuffer input stream to decode
input
,
ResolvableType
the expected type of elements in the output stream; this type must have been previously passed to the canDecode method and it must have returned true.
elementType
,
MimeType
the MIME type associated with the input stream (optional)
mimeType
,
Map<String, Object>
additional information about how to do decode
hints
)

Overrides org.springframework.http.codec.json.AbstractJackson2Decoder.decode.

Implements org.springframework.core.codec.Decoder.decode.

Decode a DataBuffer input stream into a Flux of T.
Inherited from org.springframework.http.codec.json.AbstractJackson2Decoder:
canDecodecustomizeReaderdecodedecodeToMonogetAnnotationgetDecodableMimeTypesgetDecodableMimeTypesgetDecodeHintsgetMaxInMemorySizeprocessInputsetMaxInMemorySize

Constructor Detail

Jackson2CborDecoderback to summary
public Jackson2CborDecoder()
Jackson2CborDecoderback to summary
public Jackson2CborDecoder(ObjectMapper mapper, MimeType... mimeTypes)

Method Detail

decodeback to summary
public Flux<Object> decode(Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints)

Overrides org.springframework.http.codec.json.AbstractJackson2Decoder.decode.

Implements org.springframework.core.codec.Decoder.decode.

Doc from org.springframework.core.codec.Decoder.decode.

Decode a DataBuffer input stream into a Flux of T.

Parameters
input:Publisher<DataBuffer>

the DataBuffer input stream to decode

elementType:ResolvableType

the expected type of elements in the output stream; this type must have been previously passed to the canDecode method and it must have returned true.

mimeType:MimeType

the MIME type associated with the input stream (optional)

hints:Map<String, Object>

additional information about how to do decode

Returns:Flux<Object>

the output stream with decoded elements

Annotations
@Override