fromJson
Converts a JSON string to an object of the specified class.
Return
An object of the specified class.
Parameters
json
The JSON string to convert.
clazz
The class of the object to create.
Throws
If there is an error processing the JSON string.
Converts a JSON string to an object of the specified TypeReference.
Return
An object of the specified TypeReference.
Parameters
json
The JSON string to convert.
ref
The TypeReference of the object to create.
Throws
If there is an error processing the JSON string.