Metric.fromJson constructor

Metric.fromJson(
  1. Map json_
)

Implementation

Metric.fromJson(core.Map json_)
    : this(
        fractions: json_.containsKey('fractions')
            ? (json_['fractions'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  (value as core.num).toDouble(),
                ),
              )
            : null,
        histogram: json_.containsKey('histogram')
            ? (json_['histogram'] as core.List)
                .map((value) => Bin.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        percentiles: json_.containsKey('percentiles')
            ? Percentiles.fromJson(
                json_['percentiles'] as core.Map<core.String, core.dynamic>)
            : null,
      );