@SuppressWarnings("unchecked")
   public Extensions deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
      JsonObject o = json.getAsJsonObject();
      Extensions extensions = new Extensions();
      for (Map.Entry<String, JsonElement> entry : o.entrySet()) {
         String key = entry.getKey();
         JsonElement jsonElement = entry.getValue();
         Object extension;
         Type type = typeExtensions.get(key);
         if (type != null) {
            extension = gson.fromJson(jsonElement, type);
         }
         else {
            Class clazz = classExtensions.get(key);
            if (clazz != null) {
               extension = gson.fromJson(jsonElement, clazz);
            }
            else {
               extension = jsonElement;
            }
         }
         extensions.put(key, extension);
      }
      return extensions;
   }