public class JsonResponse extends Object implements Serializable
| 构造器和说明 |
|---|
JsonResponse() |
JsonResponse(boolean status,
int code,
String message,
Object data)
Constructs a json response with status, code, message, data
|
JsonResponse(boolean status,
Object data)
Constructs a json response with status and data
|
JsonResponse(boolean status,
String message)
Constructs a json response with status and message
|
JsonResponse(boolean status,
String message,
Object data)
Constructs a json response with status, message, data
|
JsonResponse(Object data)
Constructs a success json response with data
|
| 限定符和类型 | 方法和说明 |
|---|---|
JsonResponse |
addParam(String key,
Object value)
Add other data
|
JsonResponse |
removeParam(String key)
Remove other data
|
JsonResponse |
setParams(Map<String,Object> params)
Set other datas
|
public JsonResponse()
public JsonResponse(Object data)
data - the response datapublic JsonResponse(boolean status,
Object data)
status - the response statusdata - the response datapublic JsonResponse(boolean status,
String message)
status - the response statusmessage - the response messagepublic JsonResponse(boolean status,
String message,
Object data)
status - the response statusmessage - the response messagedata - the response datapublic JsonResponse setParams(Map<String,Object> params)
params - dataspublic JsonResponse addParam(String key, Object value)
key - key of datavalue - datapublic JsonResponse removeParam(String key)
key - key of dataCopyright © 2017. All rights reserved.