public class ApiResult extends Object
http://wiki.fasterxml.com/JacksonInFiveMinutes JSON TYPE JAVA TYPE object LinkedHashMap<String,Object> array ArrayList<Object> string String number (no fraction) Integer, Long or BigInteger (smallest applicable) number (fraction) Double (configurable to use BigDecimal) true|false Boolean null null
| 限定符和类型 | 方法和说明 |
|---|---|
static ApiResult |
create(String jsonStr)
通过 json 创建 ApiResult 对象,等价于 new ApiResult(jsonStr)
|
<T> T |
get(String name) |
BigDecimal |
getBigDecimal(String name) |
BigInteger |
getBigInteger(String name) |
Boolean |
getBoolean(String name) |
Double |
getDouble(String name) |
Integer |
getErrorCode() |
Integer |
getInt(String name) |
String |
getJson() |
List |
getList(String name) |
Long |
getLong(String name) |
Map |
getMap(String name) |
String |
getStr(String name) |
boolean |
isSucceed()
APi 请求是否成功返回
|
String |
toString() |
public ApiResult(String jsonStr)
jsonStr - json字符串public static ApiResult create(String jsonStr)
jsonStr - json字符串public String getJson()
public Integer getErrorCode()
public boolean isSucceed()
public <T> T get(String name)
public BigInteger getBigInteger(String name)
public BigDecimal getBigDecimal(String name)
Copyright © 2020. All rights reserved.