Package com.kaltura.client.utils
Class GsonParser
- java.lang.Object
-
- com.kaltura.client.utils.GsonParser
-
public class GsonParser extends Object
Created by tehilarozin on 24/07/2016.
-
-
Constructor Summary
Constructors Constructor Description GsonParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Class<T>getObjectClass(String objectType, Class<T> defaultClass)static List<?>parseArray(com.google.gson.JsonArray jsonArray, Class<?>[] types)static <T> List<T>parseArray(com.google.gson.JsonArray jsonArray, Class<T> clz)static List<?>parseArray(String result, Class<?>[] types)static <T> List<T>parseArray(String result, Class<T> clz)static BooleanparseBoolean(com.google.gson.JsonElement jsonElement)static DoubleparseDouble(com.google.gson.JsonElement jsonElement)static APIExceptionparseException(String result)static IntegerparseInt(com.google.gson.JsonElement jsonElement)static <T> ListResponse<T>parseListResponse(String result, Class<T> clz)static LongparseLong(com.google.gson.JsonElement jsonElement)static <T> Map<String,T>parseMap(com.google.gson.JsonObject jsonMap, Class<T> clz)static <T> TparseObject(com.google.gson.JsonElement jsonElement, Class<T> clz)static <T> TparseObject(com.google.gson.JsonObject jsonObject, Class<T> clz)static <T> TparseObject(String result, Class<T> clz)static StringparseString(com.google.gson.JsonElement jsonElement)
-
-
-
Method Detail
-
parseObject
public static <T> T parseObject(String result, Class<T> clz) throws APIException
- Throws:
APIException
-
parseObject
public static <T> T parseObject(com.google.gson.JsonElement jsonElement, Class<T> clz) throws APIException- Throws:
APIException
-
parseObject
public static <T> T parseObject(com.google.gson.JsonObject jsonObject, Class<T> clz) throws APIException- Throws:
APIException
-
parseArray
public static List<?> parseArray(String result, Class<?>[] types) throws APIException
- Throws:
APIException
-
parseArray
public static List<?> parseArray(com.google.gson.JsonArray jsonArray, Class<?>[] types) throws APIException
- Throws:
APIException
-
parseArray
public static <T> List<T> parseArray(String result, Class<T> clz) throws APIException
- Throws:
APIException
-
parseArray
public static <T> List<T> parseArray(com.google.gson.JsonArray jsonArray, Class<T> clz) throws APIException
- Throws:
APIException
-
parseListResponse
public static <T> ListResponse<T> parseListResponse(String result, Class<T> clz) throws APIException
- Throws:
APIException
-
parseException
public static APIException parseException(String result)
-
parseString
public static String parseString(com.google.gson.JsonElement jsonElement)
-
parseInt
public static Integer parseInt(com.google.gson.JsonElement jsonElement)
-
parseBoolean
public static Boolean parseBoolean(com.google.gson.JsonElement jsonElement)
-
parseDouble
public static Double parseDouble(com.google.gson.JsonElement jsonElement)
-
parseLong
public static Long parseLong(com.google.gson.JsonElement jsonElement)
-
parseMap
public static <T> Map<String,T> parseMap(com.google.gson.JsonObject jsonMap, Class<T> clz) throws APIException
- Throws:
APIException
-
-