Package org.gcube.idm.client.model.util
Class JsonUtilsCustom
- java.lang.Object
-
- org.gcube.idm.client.model.util.JsonUtilsCustom
-
public class JsonUtilsCustom extends Object
-
-
Constructor Summary
Constructors Constructor Description JsonUtilsCustom()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TfromJson(byte[] bytes, Class<T> raw)Deserializes the specified Json bytes into an object of the specified classstatic <T> TfromJson(byte[] bytes, org.gcube.com.fasterxml.jackson.databind.JavaType type)Deserializes the specified Json bytes into an object of the specified classstatic <T> TfromJson(String json, Class<T> raw)Deserializes the specified Json bytes into an object of the specified classstatic <T> TfromJson(String json, org.gcube.com.fasterxml.jackson.databind.JavaType objectType)Deserializes the specified Json bytes into an object of the specified classstatic org.gcube.com.fasterxml.jackson.databind.JavaTypegeListOfObjectsType(Class<?> classType)static org.gcube.com.fasterxml.jackson.databind.JavaTypegeListOfObjectsType(org.gcube.com.fasterxml.jackson.databind.JavaType objectsType)static org.gcube.com.fasterxml.jackson.databind.JavaTypegeMapOfObjectsType(Class<?> keyClass, Class<?> valueClass)static org.gcube.com.fasterxml.jackson.databind.JavaTypegeMapOfObjectsType(org.gcube.com.fasterxml.jackson.databind.JavaType keyType, org.gcube.com.fasterxml.jackson.databind.JavaType valueType)static org.gcube.com.fasterxml.jackson.databind.JavaTypegetObjectJT(Class<?> classType)static org.gcube.com.fasterxml.jackson.databind.JavaTypegetResponseBeanOfListOfObjectsType(Class<?> classType)static org.gcube.com.fasterxml.jackson.databind.JavaTypegetResponseBeanOfListOfObjectsType(org.gcube.com.fasterxml.jackson.databind.JavaType listOfObjectType)static org.gcube.com.fasterxml.jackson.databind.JavaTypegetResponseBeanOfObjectsType(org.gcube.com.fasterxml.jackson.databind.JavaType objectsType)static org.gcube.com.fasterxml.jackson.databind.JavaTypegetResponseBeansObjectJT(Class<?> classType)static <T> TresponseBeanFromJson(byte[] bytes, org.gcube.com.fasterxml.jackson.databind.JavaType type)Deserializes the specified Json bytes into an object of the specified class
-
-
-
Method Detail
-
getObjectJT
public static org.gcube.com.fasterxml.jackson.databind.JavaType getObjectJT(Class<?> classType)
-
getResponseBeansObjectJT
public static org.gcube.com.fasterxml.jackson.databind.JavaType getResponseBeansObjectJT(Class<?> classType)
-
getResponseBeanOfObjectsType
public static org.gcube.com.fasterxml.jackson.databind.JavaType getResponseBeanOfObjectsType(org.gcube.com.fasterxml.jackson.databind.JavaType objectsType)
-
geListOfObjectsType
public static org.gcube.com.fasterxml.jackson.databind.JavaType geListOfObjectsType(Class<?> classType)
-
geListOfObjectsType
public static org.gcube.com.fasterxml.jackson.databind.JavaType geListOfObjectsType(org.gcube.com.fasterxml.jackson.databind.JavaType objectsType)
-
geMapOfObjectsType
public static org.gcube.com.fasterxml.jackson.databind.JavaType geMapOfObjectsType(Class<?> keyClass, Class<?> valueClass)
-
geMapOfObjectsType
public static org.gcube.com.fasterxml.jackson.databind.JavaType geMapOfObjectsType(org.gcube.com.fasterxml.jackson.databind.JavaType keyType, org.gcube.com.fasterxml.jackson.databind.JavaType valueType)
-
getResponseBeanOfListOfObjectsType
public static org.gcube.com.fasterxml.jackson.databind.JavaType getResponseBeanOfListOfObjectsType(Class<?> classType)
-
getResponseBeanOfListOfObjectsType
public static org.gcube.com.fasterxml.jackson.databind.JavaType getResponseBeanOfListOfObjectsType(org.gcube.com.fasterxml.jackson.databind.JavaType listOfObjectType)
-
fromJson
public static <T> T fromJson(byte[] bytes, org.gcube.com.fasterxml.jackson.databind.JavaType type) throws ExceptionDeserializes the specified Json bytes into an object of the specified class- Type Parameters:
T- the type of the desired object- Parameters:
json- the string from which the object is to be deserializedclassOfT- the class of T- Returns:
- an object of type T from the bytes
- Throws:
Exception- if the deserialization fails
-
responseBeanFromJson
public static <T> T responseBeanFromJson(byte[] bytes, org.gcube.com.fasterxml.jackson.databind.JavaType type) throws ExceptionDeserializes the specified Json bytes into an object of the specified class- Type Parameters:
T- the type of the desired object- Parameters:
json- the string from which the object is to be deserializedclassOfT- the class of T- Returns:
- an object of type T from the bytes
- Throws:
Exception- if the deserialization fails
-
fromJson
public static <T> T fromJson(byte[] bytes, Class<T> raw) throws ExceptionDeserializes the specified Json bytes into an object of the specified class- Type Parameters:
T- the type of the desired object- Parameters:
json- the string from which the object is to be deserializedclassOfT- the class of T- Returns:
- an object of type T from the bytes
- Throws:
Exception- if the deserialization fails
-
fromJson
public static <T> T fromJson(String json, Class<T> raw) throws Exception
Deserializes the specified Json bytes into an object of the specified class- Type Parameters:
T- the type of the desired object- Parameters:
json- the string from which the object is to be deserializedraw- the class of T- Returns:
- an object of type T from the bytes
- Throws:
Exception- if the deserialization fails
-
fromJson
public static <T> T fromJson(String json, org.gcube.com.fasterxml.jackson.databind.JavaType objectType) throws Exception
Deserializes the specified Json bytes into an object of the specified class- Type Parameters:
T- the type of the desired object- Parameters:
json- the string from which the object is to be deserializedraw- the class of T- Returns:
- an object of type T from the bytes
- Throws:
Exception- if the deserialization fails
-
-