fromJson
Parses the specified JSON string into an object of type T using Gson library.
Return
The parsed object of type T.
Parameters
The JSON string to parse.
Throws
if the JSON is not well-formed or cannot be parsed.
Parses JSON data from a Reader into an object of type T using the Gson library.
Return
The parsed object of type T.
Parameters
The Reader providing the JSON data.
Throws
if the JSON is not well-formed or cannot be parsed into the specified type.
Parses the specified JsonElement into an object of type T using Gson library.
Return
The parsed object of type T.
Parameters
The JsonElement to parse.
Throws
if the JSON is not well-formed or cannot be parsed.
Parses the specified string into an object of type T using Gson library.
Return
The parsed object of type T.
Parameters
The json string to parse.
Throws
if the JSON is not well-formed or cannot be parsed.
Parses the specified JSON string into an object of type T using Gson library. With additional parameter to add your custom deserializer.
Return
The parsed object of type T.
Parameters
The JSON string to parse.
The JSON deserializer to use for parsing.
Throws
if the JSON is not well-formed or cannot be parsed.
Parses the response body of this Response into an object of type T using Gson.
Return
The parsed object of type T.
Parameters
The error message to use if the response body is empty.
Throws
If the response body is empty.
If the JSON is not well-formed or cannot be parsed into the specified type.