public class FastJsonHttpMessageConverter extends org.springframework.http.converter.AbstractHttpMessageConverter<Object> implements org.springframework.http.converter.GenericHttpMessageConverter<Object>
Compatible fastjson 1.2.x
AbstractHttpMessageConverter,
GenericHttpMessageConverter| Constructor and Description |
|---|
FastJsonHttpMessageConverter()
Can serialize/deserialize all types.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(Type type,
Class<?> contextClass,
org.springframework.http.MediaType mediaType) |
boolean |
canWrite(Type type,
Class<?> clazz,
org.springframework.http.MediaType mediaType) |
FastJsonConfig |
getFastJsonConfig() |
protected Type |
getType(Type type,
Class<?> contextClass) |
Object |
read(Type type,
Class<?> contextClass,
org.springframework.http.HttpInputMessage inputMessage) |
protected Object |
readInternal(Class<?> clazz,
org.springframework.http.HttpInputMessage inputMessage) |
void |
setFastJsonConfig(FastJsonConfig fastJsonConfig) |
protected boolean |
supports(Class<?> clazz) |
void |
write(Object o,
Type type,
org.springframework.http.MediaType contentType,
org.springframework.http.HttpOutputMessage outputMessage) |
protected void |
writeInternal(Object object,
org.springframework.http.HttpOutputMessage outputMessage) |
addDefaultHeaders, canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, writepublic FastJsonHttpMessageConverter()
public FastJsonConfig getFastJsonConfig()
public void setFastJsonConfig(FastJsonConfig fastJsonConfig)
fastJsonConfig - the fastJsonConfig to set.protected boolean supports(Class<?> clazz)
supports in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>public boolean canRead(Type type, Class<?> contextClass, org.springframework.http.MediaType mediaType)
canRead in interface org.springframework.http.converter.GenericHttpMessageConverter<Object>public boolean canWrite(Type type, Class<?> clazz, org.springframework.http.MediaType mediaType)
canWrite in interface org.springframework.http.converter.GenericHttpMessageConverter<Object>public Object read(Type type, Class<?> contextClass, org.springframework.http.HttpInputMessage inputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotReadableException
read in interface org.springframework.http.converter.GenericHttpMessageConverter<Object>IOExceptionorg.springframework.http.converter.HttpMessageNotReadableExceptionpublic void write(Object o, Type type, org.springframework.http.MediaType contentType, org.springframework.http.HttpOutputMessage outputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotWritableException
write in interface org.springframework.http.converter.GenericHttpMessageConverter<Object>IOExceptionorg.springframework.http.converter.HttpMessageNotWritableExceptionprotected Object readInternal(Class<?> clazz, org.springframework.http.HttpInputMessage inputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotReadableException
readInternal in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>IOExceptionorg.springframework.http.converter.HttpMessageNotReadableExceptionprotected void writeInternal(Object object, org.springframework.http.HttpOutputMessage outputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotWritableException
writeInternal in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>IOExceptionorg.springframework.http.converter.HttpMessageNotWritableExceptionCopyright © 2022 Alibaba Group. All rights reserved.