import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; public class GsonDeserializer { public static void main(String []args) { Gson gson = new Gson(); GenericResponse<UserResponse> response = gson.fromJson(jsonString, new TypeToken<GenericResponse<UserResponse>>(){}.getType()); System.out.println(response.getData().getName()); System.out.println(response.getData().getEmail()); GenericResponse<SocialAccountsResponse> socialAccountResponse = gson.fromJson(jsonString, new TypeToken<GenericResponse<SocialAccountsResponse>>(){}.getType()); System.out.println(socialAccountResponse.getData().getId()); System.out.println(socialAccountResponse.getData().getProfileUrl()); } }