daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Oct 12th, 2017 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Logo {
  2.     private String name;
  3.     private String provider_name;
  4.     private String url;
  5.     private String average_width;
  6.    
  7. {
  8.     "logo": {
  9.         "id": 1,
  10.         "name": "Logo_optim.png",
  11.         "provider_name": "some name of provider",
  12.         "info": "company_logo",
  13.         "delta": {
  14.             "reference": {
  15.                 "url": "url for this image",
  16.                 "width": 536,
  17.                 "height": 379
  18.             },
  19.             "average": {
  20.                 "url": "url for this image",
  21.                 "width": 239,
  22.                 "height": 169
  23.             }
  24.         }
  25.     }
  26. }
  27.    
  28. public class LogoAdapteJsonDeserilizer implements JsonDeserializer<Logo > {
  29.  
  30.     @Override
  31.     public Logo deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
  32.         // mapping code here
  33.         return logo ;
  34.     }
  35. }
  36.    
  37. public class Logo {
  38.     @Map(name)
  39.     private String name;
  40.     @Map(provider_name)
  41.     private String provider_name;
  42.     @Map(delta.reference.average.url)
  43.     private String url;
  44.     @Map(delta.reference.average.width)
  45.     private String average_width;
RAW Paste Data
Top