use of io.cdap.cdap.api.lineage.field.OperationType in project cdap by caskdata.
the class OperationTypeAdapter method deserialize.
@Override
public Operation deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
JsonObject jsonObj = json.getAsJsonObject();
OperationType type = context.deserialize(jsonObj.get("type"), OperationType.class);
switch(type) {
case READ:
return context.deserialize(json, ReadOperation.class);
case TRANSFORM:
return context.deserialize(json, TransformOperation.class);
case WRITE:
return context.deserialize(json, WriteOperation.class);
}
return null;
}
Aggregations