Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //exhibit a...
- {
- Gson gson = new Gson();
- Type aType = new TypeToken<List<A>>(){}.getType();
- String contentString = result.getResponse().getContentAsString();
- List<A> results = gson.fromJson(contentString, aType);
- }
- //exhibit b...
- {
- Gson gson = new Gson();
- Type bType = new TypeToken<List<B>>(){}.getType();
- String contentString = result.getResponse().getContentAsString();
- List<B> results = gson.fromJson(contentString, bType);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement