fromJson static method

DiffEntityType? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static DiffEntityType? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  switch (json['@type']) {
    case DiffEntityTypeDelete.constructor:
      return DiffEntityTypeDelete.fromJson(json);

    case DiffEntityTypeInsert.constructor:
      return DiffEntityTypeInsert.fromJson(json);

    case DiffEntityTypeReplace.constructor:
      return DiffEntityTypeReplace.fromJson(json);

    default:
      return null;
  }
}