I have a method for reading JSON from a service, I\'m using Gson to do my serialization and have written the following method using type parameters.
public T
If you are using SpringFramework you could use ParameterizedTypeReference as follows:
SpringFramework
ParameterizedTypeReference
restClient.getDeserializedJSON(ParameterizedTypeReference>(){},url);