public class FastJsonHttpMessageConverter
extends <any>
Compatible Spring MVC version 3.2+
Supported return type:
Simple object: Object
With property filter :FastJsonContainer[Object]
Jsonp :MappingFastJsonValue[Object]
Jsonp with property filter: MappingFastJsonValue[FastJsonContainer[Object]]AbstractHttpMessageConverter,
GenericHttpMessageConverter| Modifier and Type | Field and Description |
|---|---|
static MediaType |
APPLICATION_JAVASCRIPT |
protected String |
dateFormat
Deprecated.
|
protected SerializerFeature[] |
features
Deprecated.
|
protected SerializeFilter[] |
filters
Deprecated.
|
| 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,
MediaType mediaType) |
boolean |
canWrite(Type type,
Class<?> clazz,
MediaType mediaType) |
Charset |
getCharset()
Deprecated.
|
String |
getDateFormat()
Deprecated.
|
FastJsonConfig |
getFastJsonConfig() |
SerializerFeature[] |
getFeatures()
Deprecated.
|
SerializeFilter[] |
getFilters()
Deprecated.
|
protected Type |
getType(Type type,
Class<?> contextClass) |
Object |
read(Type type,
Class<?> contextClass,
HttpInputMessage inputMessage) |
protected Object |
readInternal(Class<?> clazz,
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.
|
protected boolean |
supports(Class<?> clazz) |
void |
write(Object o,
Type type,
MediaType contentType,
HttpOutputMessage outputMessage) |
protected void |
writeInternal(Object object,
HttpOutputMessage outputMessage) |
public static final MediaType APPLICATION_JAVASCRIPT
@Deprecated protected SerializerFeature[] features
@Deprecated protected SerializeFilter[] filters
@Deprecated protected String dateFormat
public FastJsonHttpMessageConverter()
public FastJsonConfig getFastJsonConfig()
public void setFastJsonConfig(FastJsonConfig fastJsonConfig)
fastJsonConfig - the fastJsonConfig to set.@Deprecated public Charset getCharset()
FastJsonConfig.getCharset()@Deprecated public void setCharset(Charset charset)
charset - the charsetFastJsonConfig.setCharset(Charset)@Deprecated public String getDateFormat()
FastJsonConfig.getDateFormat()@Deprecated public void setDateFormat(String dateFormat)
dateFormat - the date formatFastJsonConfig.setDateFormat(String)@Deprecated public SerializerFeature[] getFeatures()
FastJsonConfig.getSerializerFeatures()@Deprecated public void setFeatures(SerializerFeature... features)
features - the featuresFastJsonConfig.setSerializerFeatures(SerializerFeature...)@Deprecated public SerializeFilter[] getFilters()
FastJsonConfig.getSerializeFilters()@Deprecated public void setFilters(SerializeFilter... filters)
filters - the filtersFastJsonConfig.setSerializeFilters(SerializeFilter...)@Deprecated public void addSerializeFilter(SerializeFilter filter)
filter - the filterFastJsonConfig.setSerializeFilters(SerializeFilter...)protected boolean supports(Class<?> clazz)
public Object read(Type type, Class<?> contextClass, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException
IOExceptionHttpMessageNotReadableExceptionpublic void write(Object o, Type type, MediaType contentType, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException
IOExceptionHttpMessageNotWritableExceptionprotected Object readInternal(Class<?> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException
IOExceptionHttpMessageNotReadableExceptionprotected void writeInternal(Object object, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException
IOExceptionHttpMessageNotWritableExceptionCopyright © 2023. All rights reserved.