|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractView
net.sf.json.spring.web.servlet.view.JsonView
public class JsonView
A View that renders its model as a JSON object.
| Field Summary |
|---|
| Fields inherited from class org.springframework.web.servlet.view.AbstractView |
|---|
DEFAULT_CONTENT_TYPE |
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
JsonView()
|
|
| Method Summary | |
|---|---|
protected net.sf.json.JSON |
createJSON(java.util.Map model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Creates a JSON [JSONObject,JSONArray,JSONNUll] from the model values. |
protected net.sf.json.JSON |
defaultCreateJSON(java.util.Map model)
Creates a JSON [JSONObject,JSONArray,JSONNUll] from the model values. |
protected java.lang.String[] |
getExcludedProperties()
Returns the group of properties to be excluded. |
net.sf.json.JsonConfig |
getJsonConfig()
|
boolean |
isForceTopLevelArray()
|
boolean |
isIgnoreDefaultExcludes()
Returns whether the JSONSerializer will ignore or not its internal property exclusions. |
boolean |
isSkipBindingResult()
Returns whether the JSONSerializer will skip or not any BindingResult related keys on the model. |
protected void |
renderMergedOutputModel(java.util.Map model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
setExcludedProperties(java.lang.String[] excludedProperties)
Sets the group of properties to be excluded. |
void |
setForceTopLevelArray(boolean forceTopLevelArray)
|
void |
setIgnoreDefaultExcludes(boolean ignoreDefaultExcludes)
Sets whether the JSONSerializer will ignore or not its internal property exclusions. |
void |
setJsonConfig(net.sf.json.JsonConfig jsonConfig)
|
void |
setSkipBindingResult(boolean skipBindingResult)
Sets whether the JSONSerializer will skip or not any BindingResult related keys on the model. |
protected void |
writeJSON(java.util.Map model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
| Methods inherited from class org.springframework.web.servlet.view.AbstractView |
|---|
addStaticAttribute, createRequestContext, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setRequestContextAttribute, toString |
| Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
|---|
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext |
| Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JsonView()
| Method Detail |
|---|
public net.sf.json.JsonConfig getJsonConfig()
public boolean isForceTopLevelArray()
public boolean isIgnoreDefaultExcludes()
public boolean isSkipBindingResult()
Models in Spring >= 2.5 will cause an exception as they contain a BindingResult that cycles back.
public void setExcludedProperties(java.lang.String[] excludedProperties)
public void setForceTopLevelArray(boolean forceTopLevelArray)
public void setIgnoreDefaultExcludes(boolean ignoreDefaultExcludes)
public void setJsonConfig(net.sf.json.JsonConfig jsonConfig)
public void setSkipBindingResult(boolean skipBindingResult)
Models in Spring >= 2.5 will cause an exception as they contain a BindingResult that cycles back.
protected net.sf.json.JSON createJSON(java.util.Map model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
protected final net.sf.json.JSON defaultCreateJSON(java.util.Map model)
protected java.lang.String[] getExcludedProperties()
protected void renderMergedOutputModel(java.util.Map model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
renderMergedOutputModel in class org.springframework.web.servlet.view.AbstractViewjava.lang.Exception
protected void writeJSON(java.util.Map model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||