Class JsonUtils
java.lang.Object
org.gcube.common.gxrest.response.inbound.JsonUtils
Manipulation of an
GXInboundResponse's content.- Author:
- Manuele Simi (ISTI CNR), Luca Frosini (ISTI-CNR)
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JsonUtils
public JsonUtils()
-
-
Method Details
-
fromJson
Deserializes the specified Json bytes into an object of the specified class- Type Parameters:
T- the type of the desired object- Parameters:
bytes- the bytes 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
Deserializes the specified Json string 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 string
- Throws:
Exception- if the deserialization fails
-