MetricValue.fromJson constructor

MetricValue.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory MetricValue.fromJson(Map<String, dynamic> json) {
  return MetricValue(
    cidrs: (json['cidrs'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    count: json['count'] as int?,
    number: json['number'] as double?,
    numbers: (json['numbers'] as List?)
        ?.whereNotNull()
        .map((e) => e as double)
        .toList(),
    ports: (json['ports'] as List?)
        ?.whereNotNull()
        .map((e) => e as int)
        .toList(),
    strings: (json['strings'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
  );
}