daily pastebin goal
33%
SHARE
TWEET

Untitled

a guest Jan 11th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         //exhibit a...
  2. {
  3.         Gson gson = new Gson();
  4.         Type aType = new TypeToken<List<A>>(){}.getType();
  5.  
  6.         String contentString = result.getResponse().getContentAsString();
  7.         List<A> results = gson.fromJson(contentString, aType);
  8. }
  9.  
  10.  
  11.  
  12.         //exhibit b...
  13. {
  14.         Gson gson = new Gson();
  15.         Type bType = new TypeToken<List<B>>(){}.getType();
  16.  
  17.         String contentString = result.getResponse().getContentAsString();
  18.         List<B> results = gson.fromJson(contentString, bType);
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top