use of org.summerb.easycrud.api.dto.EntityChangedEvent.ChangeType in project summerb by skarpushin.
the class EntityChangedEventAdapter method deserialize.
@SuppressWarnings({ "unchecked", "deprecation" })
@Override
public EntityChangedEvent deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
JsonObject jsonObject = json.getAsJsonObject();
Class<? extends DtoBase> klass = resolveParametersClass(jsonObject);
JsonElement jsonElement = jsonObject.get(INSTANCE);
DtoBase value = context.deserialize(jsonElement, klass);
ChangeType changeType = context.deserialize(jsonObject.get("ct"), ChangeType.class);
return new EntityChangedEvent(value, changeType);
}
Aggregations