AggregationResult.fromJson constructor

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

Implementation

factory AggregationResult.fromJson(Map<String, dynamic> json) {
  return AggregationResult(
    pointwiseMetricResult: decode(
      json['pointwiseMetricResult'],
      PointwiseMetricResult.fromJson,
    ),
    pairwiseMetricResult: decode(
      json['pairwiseMetricResult'],
      PairwiseMetricResult.fromJson,
    ),
    exactMatchMetricValue: decode(
      json['exactMatchMetricValue'],
      ExactMatchMetricValue.fromJson,
    ),
    bleuMetricValue: decode(
      json['bleuMetricValue'],
      BleuMetricValue.fromJson,
    ),
    rougeMetricValue: decode(
      json['rougeMetricValue'],
      RougeMetricValue.fromJson,
    ),
    aggregationMetric:
        decodeEnum(
          json['aggregationMetric'],
          Metric_AggregationMetric.fromJson,
        ) ??
        Metric_AggregationMetric.$default,
  );
}