public class FastJsonJsonView
extends org.springframework.web.servlet.view.AbstractView
AbstractView
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CONTENT_TYPE
default content type
|
static String |
DEFAULT_JSONP_CONTENT_TYPE
Default content type for JSONP: "application/javascript".
|
Constructor and Description |
---|
FastJsonJsonView()
Set default param.
|
Modifier and Type | Method and Description |
---|---|
Charset |
getCharset()
Deprecated.
|
String |
getDateFormat()
Deprecated.
|
FastJsonConfig |
getFastJsonConfig() |
SerializerFeature[] |
getFeatures()
Deprecated.
|
SerializeFilter[] |
getFilters()
Deprecated.
|
boolean |
isExtractValueFromSingleKeyModel()
Check extractValueFromSingleKeyModel.
|
void |
setCharset(Charset charset)
Deprecated.
|
void |
setDateFormat(String dateFormat)
Deprecated.
|
void |
setDisableCaching(boolean disableCaching)
Disables caching of the generated JSON.
|
void |
setExtractValueFromSingleKeyModel(boolean extractValueFromSingleKeyModel)
Set extractValueFromSingleKeyModel.
|
void |
setFastJsonConfig(FastJsonConfig fastJsonConfig) |
void |
setFeatures(SerializerFeature... features)
Deprecated.
|
void |
setFilters(SerializeFilter... filters)
Deprecated.
|
void |
setJsonpParameterNames(Set<String> jsonpParameterNames)
Set JSONP request parameter names.
|
void |
setRenderedAttributes(Set<String> renderedAttributes)
Set renderedAttributes.
|
void |
setSerializerFeature(SerializerFeature... features)
Deprecated.
|
void |
setUpdateContentLength(boolean updateContentLength)
Whether to update the 'Content-Length' header of the response.
|
addStaticAttribute, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, isExposePathVariables, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, toString
setServletContext
public static final String DEFAULT_CONTENT_TYPE
public static final String DEFAULT_JSONP_CONTENT_TYPE
public FastJsonConfig getFastJsonConfig()
public void setFastJsonConfig(FastJsonConfig fastJsonConfig)
fastJsonConfig
- the fastJsonConfig to set.@Deprecated public void setSerializerFeature(SerializerFeature... features)
features
- the featuresFastJsonConfig.setSerializerFeatures(SerializerFeature...)
@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...)
public void setRenderedAttributes(Set<String> renderedAttributes)
renderedAttributes
- renderedAttributespublic boolean isExtractValueFromSingleKeyModel()
public void setExtractValueFromSingleKeyModel(boolean extractValueFromSingleKeyModel)
extractValueFromSingleKeyModel
- public void setJsonpParameterNames(Set<String> jsonpParameterNames)
The parameter names configured by default are "jsonp" and "callback".
public void setDisableCaching(boolean disableCaching)
Default is true
, which will prevent the client from caching the
generated JSON.
public void setUpdateContentLength(boolean updateContentLength)
true
, the response is buffered in order to determine the
content length and set the 'Content-Length' header of the response.
The default setting is false
.
Copyright © 2012–2022 Alibaba Group. All rights reserved.