IssueFieldOptionScopeBean.fromJson constructor

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

Implementation

factory IssueFieldOptionScopeBean.fromJson(Map<String, Object?> json) {
  return IssueFieldOptionScopeBean(
    global: json[r'global'] != null
        ? GlobalScopeBean.fromJson(json[r'global']! as Map<String, Object?>)
        : null,
    projects: (json[r'projects'] as List<Object?>?)
            ?.map((i) => (i as num?)?.toInt() ?? 0)
            .toList() ??
        [],
    projects2: (json[r'projects2'] as List<Object?>?)
            ?.map((i) => ProjectScopeBean.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}