所有方法 静态方法 具体方法
| 修饰符和类型 |
方法 |
说明 |
static com.google.gson.JsonObject |
beanToJsonObj(Object bean) |
|
static <T> T |
fromJson(com.google.gson.JsonObject jsonObject,
Class<T> cls) |
|
static <T> T |
fromJson(String gsonString,
Class<T> cls) |
将json转成特定的cls的对象
|
static <T> T |
fromJson(String json,
Type typeOfT) |
|
static com.google.gson.Gson |
getGson() |
|
static <T> T |
toBean(String jsonStr,
Class<T> cls) |
|
static <T> T |
toBean(String jsonStr,
ParameterizedType parameterizedType) |
|
static String |
toJsonStr(Object object) |
|
static String |
toJSONString(Object object) |
将对象转成json格式
|
static <T> List<T> |
toList(String json,
Class<T> cls) |
json字符串转成list
|
static Map<String,Object> |
toMap(String gsonString) |
json字符串转成map
|
static <K,V> Map<K,V> |
toMap(String gsonString,
Class<K> keyCls,
Class<V> valueCls) |
json字符串转成map
|
static <V> Map<String,V> |
toMap(String gsonString,
Class<V> valueCls) |
json字符串转成map
|