Record.fromJson constructor

Record.fromJson(
  1. Map json_
)

Implementation

Record.fromJson(core.Map json_)
    : this(
        collectionPeriod: json_.containsKey('collectionPeriod')
            ? CollectionPeriod.fromJson(json_['collectionPeriod']
                as core.Map<core.String, core.dynamic>)
            : null,
        key: json_.containsKey('key')
            ? Key.fromJson(
                json_['key'] as core.Map<core.String, core.dynamic>)
            : null,
        metrics: json_.containsKey('metrics')
            ? (json_['metrics'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  Metric.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
      );