Class JsonUtils


  • public class JsonUtils
    extends Object
    • Constructor Detail

      • JsonUtils

        public JsonUtils()
    • Method Detail

      • fromJson

        public static <T> T fromJson​(String jsonStr,
                                     Class<T> classOfT)
      • fromJson

        public static <T> T fromJson​(String jsonStr,
                                     Type typeOfT)
      • fromJson

        public static <T> T fromJson​(String jsonStr,
                                     com.google.gson.reflect.TypeToken<T> typeOfT)
      • fromJson

        public static <T> T fromJson​(com.google.gson.JsonElement jsonElement,
                                     Class<T> classOfT)
      • fromJson

        public static <T> T fromJson​(com.google.gson.JsonElement jsonElement,
                                     Type typeOfT)
      • fromJson

        public static <T> T fromJson​(com.google.gson.JsonElement jsonElement,
                                     com.google.gson.reflect.TypeToken<T> typeOfT)
      • toJson

        public static String toJson​(com.google.gson.JsonElement jsonElement)
      • toJsonTree

        public static <T> com.google.gson.JsonElement toJsonTree​(T obj)