public class Jackson2JsonEncoder extends AbstractJackson2Encoder
Object
stream to a byte stream of JSON objects using Jackson 2.9.
For non-streaming use cases, Flux
elements are collected into a List
before serialization for performance reason.Jackson2JsonDecoder
JSON_VIEW_HINT, logger
Constructor and Description |
---|
Jackson2JsonEncoder() |
Jackson2JsonEncoder(ObjectMapper mapper,
org.springframework.util.MimeType... mimeTypes) |
Modifier and Type | Method and Description |
---|---|
protected ObjectWriter |
customizeWriter(ObjectWriter writer,
org.springframework.util.MimeType mimeType,
org.springframework.core.ResolvableType elementType,
Map<String,Object> hints) |
canEncode, encode, encodeValue, getAnnotation, getEncodableMimeTypes, getEncodableMimeTypes, getEncodeHints, getJsonEncoding, getStreamingMediaTypes, getStreamingMediaTypeSeparator, setStreamingMediaTypes
getHints, getJavaType, getMimeTypes, getMimeTypes, getObjectMapper, getObjectMapperRegistrations, getObjectMappersForType, getParameter, logWarningIfNecessary, registerObjectMappersForType, selectObjectMapper, setObjectMapper, supportsMimeType
public Jackson2JsonEncoder()
public Jackson2JsonEncoder(ObjectMapper mapper, org.springframework.util.MimeType... mimeTypes)
protected ObjectWriter customizeWriter(ObjectWriter writer, @Nullable org.springframework.util.MimeType mimeType, org.springframework.core.ResolvableType elementType, @Nullable Map<String,Object> hints)
customizeWriter
in class AbstractJackson2Encoder