public class FastJsonHttpMessageConverter extends org.springframework.http.converter.AbstractHttpMessageConverter<Object> implements org.springframework.http.converter.GenericHttpMessageConverter<Object>
Compatible Spring MVC version 4.2- (Below 4.2)
AbstractHttpMessageConverter,
GenericHttpMessageConverter| Constructor and Description |
|---|
FastJsonHttpMessageConverter()
Can serialize/deserialize all types.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSerializeFilter(SerializeFilter filter)
Deprecated.
|
boolean |
canRead(Type type,
Class<?> contextClass,
org.springframework.http.MediaType mediaType) |
boolean |
canWrite(Type type,
Class<?> contextClass,
org.springframework.http.MediaType mediaType) |
Charset |
getCharset()
Deprecated.
|
String |
getDateFormat()
Deprecated.
|
FastJsonConfig |
getFastJsonConfig() |
SerializerFeature[] |
getFeatures()
Deprecated.
|
SerializeFilter[] |
getFilters()
Deprecated.
|
Object |
read(Type type,
Class<?> contextClass,
org.springframework.http.HttpInputMessage inputMessage) |
void |
setCharset(Charset charset)
Deprecated.
|
void |
setDateFormat(String dateFormat)
Deprecated.
|
void |
setFastJsonConfig(FastJsonConfig fastJsonConfig) |
void |
setFeatures(SerializerFeature... features)
Deprecated.
|
void |
setFilters(SerializeFilter... filters)
Deprecated.
|
void |
write(Object t,
Type type,
org.springframework.http.MediaType contentType,
org.springframework.http.HttpOutputMessage outputMessage) |
canRead, canWrite, getDefaultCharset, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, writepublic FastJsonHttpMessageConverter()
public FastJsonConfig getFastJsonConfig()
public void setFastJsonConfig(FastJsonConfig fastJsonConfig)
fastJsonConfig - the fastJsonConfig to set.@Deprecated public Charset getCharset()
@Deprecated public void setCharset(Charset charset)
@Deprecated public String getDateFormat()
@Deprecated public void setDateFormat(String dateFormat)
@Deprecated public SerializerFeature[] getFeatures()
@Deprecated public void setFeatures(SerializerFeature... features)
@Deprecated public SerializeFilter[] getFilters()
@Deprecated public void setFilters(SerializeFilter... filters)
@Deprecated public void addSerializeFilter(SerializeFilter filter)
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<?> contextClass, 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 t, 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.HttpMessageNotWritableExceptionCopyright © 2012–2017 Alibaba Group. All rights reserved.