
tw.com.mitake.utils.JsonUtils Maven / Gradle / Ivy
The newest version!
package tw.com.mitake.utils;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
public class JsonUtils {
public static final Gson GSON = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create();
public static T fromJson(String string, Class clazz) {
return GSON.fromJson(string, clazz);
}
public static String toJson(Object object) {
return GSON.toJson(object);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy