PagedDTOOrganizationDTO.fromJson constructor

PagedDTOOrganizationDTO.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory PagedDTOOrganizationDTO.fromJson(Map<String, Object?> json) {
  return PagedDTOOrganizationDTO(
    expands: (json[r'_expands'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
    links: json[r'_links'] != null
        ? PagedLinkDTO.fromJson(json[r'_links']! as Map<String, Object?>)
        : null,
    isLastPage: json[r'isLastPage'] as bool? ?? false,
    limit: (json[r'limit'] as num?)?.toInt(),
    size: (json[r'size'] as num?)?.toInt(),
    start: (json[r'start'] as num?)?.toInt(),
    values: (json[r'values'] as List<Object?>?)
            ?.map((i) => OrganizationDTO.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}