body<T extends DataModel> method

T body<T extends DataModel>()

Implementation

T body<T extends DataModel>() {
  final T model = DataModel.getType(T).constructor() as T;
  model.fromJSON(data);
  return model;
}