Map<String, String> properties = context.deserialize(
json.getAsJsonObject().get(PROPERTIES_TAG), GsonFactory.STRING_MAP_TYPE);
if (FormElement.getFormElementTypes().contains(type)) {
result = new FormElement(type, properties);
} else if (type == ElementType.GADGET) {
result = new Gadget(properties);
} else if (type == ElementType.IMAGE) {
result = new Image(properties);
} else if (type == ElementType.ATTACHMENT) {