CohortSpec.fromJson constructor

CohortSpec.fromJson(
  1. Map _json
)

Implementation

CohortSpec.fromJson(core.Map _json)
    : this(
        cohortReportSettings: _json.containsKey('cohortReportSettings')
            ? CohortReportSettings.fromJson(_json['cohortReportSettings']
                as core.Map<core.String, core.dynamic>)
            : null,
        cohorts: _json.containsKey('cohorts')
            ? (_json['cohorts'] as core.List)
                .map<Cohort>((value) => Cohort.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        cohortsRange: _json.containsKey('cohortsRange')
            ? CohortsRange.fromJson(
                _json['cohortsRange'] as core.Map<core.String, core.dynamic>)
            : null,
      );