public class JsonView extends AbstractView
attributes, baseViewPath, contentType, responseDEFAULT_CHARSET| Constructor and Description |
|---|
JsonView(Object obj)
构造器
|
JsonView(String jsonStr)
构造器
|
| Modifier and Type | Method and Description |
|---|---|
static JsonView |
bind(Object obj) |
protected void |
doRenderView()
视图渲染具体操作
|
JsonView |
keepNullValue() |
void |
render(OutputStream output)
视图渲染动作
|
JsonView |
snakeCase() |
JsonView |
withContentType() |
JsonView |
withJsonCallback(String callback) |
addAttribute, addAttributes, addDateHeader, addHeader, addIntHeader, buildUrl, doProcessPath, doViewInit, getAttribute, getAttributes, getBaseViewPath, getContentType, render, setContentTypepublic JsonView(Object obj)
obj - 任意对象public JsonView(String jsonStr)
jsonStr - JSON字符串public JsonView withContentType()
public JsonView withJsonCallback(String callback)
callback - 回调方法名称public JsonView keepNullValue()
public JsonView snakeCase()
protected void doRenderView()
throws Exception
AbstractViewdoRenderView in class AbstractViewException - 抛出任何可能异常public void render(OutputStream output) throws Exception
IViewrender in interface IViewrender in class AbstractViewoutput - 视图渲染指定输出流Exception - 抛出任何可能异常Copyright © 2022. All rights reserved.