Class Fastjson2Decoder

java.lang.Object
org.springframework.http.codec.json.Jackson2CodecSupport
org.springframework.http.codec.json.AbstractJackson2Decoder
com.alibaba.fastjson2.support.spring.http.codec.Fastjson2Decoder
All Implemented Interfaces:
org.springframework.core.codec.Decoder<Object>, org.springframework.http.codec.HttpMessageDecoder<Object>

public class Fastjson2Decoder extends org.springframework.http.codec.json.AbstractJackson2Decoder
Fastjson2 for Spring WebFlux.
Author:
Xi.Liu
See Also:
  • AbstractJackson2Decoder
  • Field Summary

    Fields inherited from class org.springframework.http.codec.json.Jackson2CodecSupport

    JSON_VIEW_HINT, logger
  • Constructor Summary

    Constructors
    Constructor
    Description
    Fastjson2Decoder(com.fasterxml.jackson.databind.ObjectMapper mapper, FastJsonConfig config, org.springframework.util.MimeType... mimeTypes)
     
    Fastjson2Decoder(com.fasterxml.jackson.databind.ObjectMapper mapper, org.springframework.util.MimeType... mimeTypes)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Flux<Object>
    decode(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> input, org.springframework.core.ResolvableType elementType, org.springframework.util.MimeType mimeType, Map<String,Object> hints)
     
    decode(org.springframework.core.io.buffer.DataBuffer dataBuffer, org.springframework.core.ResolvableType targetType, org.springframework.util.MimeType mimeType, Map<String,Object> hints)
     

    Methods inherited from class org.springframework.http.codec.json.AbstractJackson2Decoder

    canDecode, decodeToMono, getAnnotation, getDecodableMimeTypes, getDecodableMimeTypes, getDecodeHints, getMaxInMemorySize, processInput, setMaxInMemorySize

    Methods inherited from class org.springframework.http.codec.json.Jackson2CodecSupport

    getHints, getJavaType, getMimeTypes, getMimeTypes, getObjectMapper, getObjectMapperRegistrations, getObjectMappersForType, getParameter, logWarningIfNecessary, registerObjectMappersForType, selectObjectMapper, setObjectMapper, supportsMimeType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Fastjson2Decoder

      public Fastjson2Decoder(com.fasterxml.jackson.databind.ObjectMapper mapper, org.springframework.util.MimeType... mimeTypes)
    • Fastjson2Decoder

      public Fastjson2Decoder(com.fasterxml.jackson.databind.ObjectMapper mapper, FastJsonConfig config, org.springframework.util.MimeType... mimeTypes)
  • Method Details

    • decode

      @NonNull public reactor.core.publisher.Flux<Object> decode(@NonNull org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> input, @NonNull org.springframework.core.ResolvableType elementType, org.springframework.util.MimeType mimeType, Map<String,Object> hints)
      Specified by:
      decode in interface org.springframework.core.codec.Decoder<Object>
      Overrides:
      decode in class org.springframework.http.codec.json.AbstractJackson2Decoder
    • decode

      public Object decode(@NonNull org.springframework.core.io.buffer.DataBuffer dataBuffer, @NonNull org.springframework.core.ResolvableType targetType, org.springframework.util.MimeType mimeType, Map<String,Object> hints) throws org.springframework.core.codec.DecodingException
      Specified by:
      decode in interface org.springframework.core.codec.Decoder<Object>
      Overrides:
      decode in class org.springframework.http.codec.json.AbstractJackson2Decoder
      Throws:
      org.springframework.core.codec.DecodingException