public class FastJsonJsonView
extends AbstractView
AbstractView| Modifier and Type | Field and Description |
|---|---|
protected Charset |
charset
Deprecated.
|
protected String |
dateFormat
Deprecated.
|
static String |
DEFAULT_CONTENT_TYPE
default content type
|
static String |
DEFAULT_JSONP_CONTENT_TYPE
Default content type for JSONP: "application/javascript".
|
protected SerializerFeature[] |
features
Deprecated.
|
protected SerializeFilter[] |
filters
Deprecated.
|
| Constructor and Description |
|---|
FastJsonJsonView()
Set default param.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
filterModel(Map<String,Object> model)
Filters out undesired attributes from the given model.
|
Charset |
getCharset()
Deprecated.
|
String |
getDateFormat()
Deprecated.
|
FastJsonConfig |
getFastJsonConfig() |
SerializerFeature[] |
getFeatures()
Deprecated.
|
SerializeFilter[] |
getFilters()
Deprecated.
|
boolean |
isExtractValueFromSingleKeyModel()
Check extractValueFromSingleKeyModel.
|
protected void |
prepareResponse(HttpServletRequest request,
HttpServletResponse response) |
protected void |
renderMergedOutputModel(Map<String,Object> model,
HttpServletRequest request,
HttpServletResponse response) |
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.
|
protected void |
setResponseContentType(HttpServletRequest request,
HttpServletResponse response) |
void |
setSerializerFeature(SerializerFeature... features)
Deprecated.
|
void |
setUpdateContentLength(boolean updateContentLength)
Whether to update the 'Content-Length' header of the response.
|
public static final String DEFAULT_CONTENT_TYPE
public static final String DEFAULT_JSONP_CONTENT_TYPE
@Deprecated protected Charset charset
@Deprecated protected SerializerFeature[] features
@Deprecated protected SerializeFilter[] filters
@Deprecated protected String dateFormat
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".
protected void renderMergedOutputModel(Map<String,Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception
Exceptionprotected void prepareResponse(HttpServletRequest request,
HttpServletResponse response)
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.
protected Object filterModel(Map<String,Object> model)
Map, or a single value object.
Default implementation removes BindingResult instances and
entries not included in the renderedAttributes property.
model - the model, as passed on to renderMergedOutputModel(java.util.Map<java.lang.String, java.lang.Object>, HttpServletRequest, HttpServletResponse)protected void setResponseContentType(HttpServletRequest request,
HttpServletResponse response)
Copyright © 2023. All rights reserved.