Class JsonResult
java.lang.Object
java.util.AbstractMap<String,Object>
java.util.HashMap<String,Object>
java.util.LinkedHashMap<String,Object>
com.alibaba.fastjson2.JSONObject
net.kcqy.util.web.JsonResult
- All Implemented Interfaces:
Serializable,Cloneable,InvocationHandler,Map<String,Object>
public class JsonResult
extends com.alibaba.fastjson2.JSONObject
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonResultstatic JsonResultstatic JsonResultgetData()booleanbooleanisFail()booleanvoidvoidsetCode(int code) voidvoidvoidsetFail()voidvoidMethods inherited from class com.alibaba.fastjson2.JSONObject
clone, containsKey, containsKey, copyTo, eval, fluentPut, forEchArrayObject, from, from, get, get, getBigDecimal, getBigInteger, getBoolean, getBooleanValue, getBooleanValue, getByPath, getByte, getBytes, getByteValue, getDate, getDate, getDouble, getDoubleValue, getFloat, getFloatValue, getInstant, getInteger, getIntValue, getIntValue, getJSONArray, getJSONObject, getList, getLong, getLongValue, getLongValue, getObject, getObject, getObject, getObject, getOrDefault, getOrDefault, getShort, getShortValue, getSize, getString, invoke, isValid, nameFilter, of, of, of, of, of, of, parse, parseObject, parseObject, parseObject, parseObject, parseObject, putArray, putObject, to, to, to, to, toJavaObject, toJavaObject, toJavaObject, toJSONBBytes, toJSONString, toJSONString, toString, toString, valueFilterMethods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, keySet, removeEldestEntry, replaceAll, valuesMethods inherited from class java.util.HashMap
compute, computeIfAbsent, computeIfPresent, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode
-
Field Details
-
DATA_KEY
- See Also:
-
SUCCESS_KEY
- See Also:
-
FAIL_KEY
- See Also:
-
EXCEPTION_KEY
- See Also:
-
-
Constructor Details
-
JsonResult
public JsonResult()
-
-
Method Details
-
createWithFail
-
createWithSuccess
-
createWithException
-
isSuccess
public boolean isSuccess() -
isFail
public boolean isFail() -
isException
public boolean isException() -
getData
-
setSuccess
public void setSuccess() -
setFail
public void setFail() -
setException
public void setException() -
setCode
public void setCode(int code) -
setMsg
-
set
-
setData
-