public class GsonWrapper extends Object
Modifier and Type | Field and Description |
---|---|
static Locale |
defaultLocale |
static TimeZone |
defaultTimeZone |
static String |
DEFFAULT_DATE_FORMAT |
Constructor and Description |
---|
GsonWrapper() |
Modifier and Type | Method and Description |
---|---|
static Date |
castToDate(Object value) |
static <T> com.google.gson.TypeAdapter<T> |
getAdapter(Class<T> clazz) |
static com.google.gson.Gson |
getGsonInstance() |
static Object |
parseObject(String jsonString) |
static <T> T |
parseObject(String jsonString,
Class<T> clazz) |
static <T> T |
parseObject(String jsonString,
Type typeOfT) |
static Object |
toJavaObject(com.google.gson.JsonElement element) |
static <T> T |
toJavaObject(com.google.gson.JsonElement element,
Class<T> clazz) |
static com.google.gson.JsonElement |
toJsonElement(Object object) |
static String |
toJsonString(Map<String,Object> map) |
public static final TimeZone defaultTimeZone
public static final Locale defaultLocale
public static final String DEFFAULT_DATE_FORMAT
public static com.google.gson.Gson getGsonInstance()
public static <T> com.google.gson.TypeAdapter<T> getAdapter(Class<T> clazz)
public static com.google.gson.JsonElement toJsonElement(Object object)
public static <T> T toJavaObject(com.google.gson.JsonElement element, Class<T> clazz)
public static Object toJavaObject(com.google.gson.JsonElement element)
Copyright © 2020, 美味书签(北京)信息技术有限公司 All rights reserved.