toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (pointwiseMetricResult != null)
    'pointwiseMetricResult': pointwiseMetricResult!.toJson(),
  if (pairwiseMetricResult != null)
    'pairwiseMetricResult': pairwiseMetricResult!.toJson(),
  if (exactMatchMetricValue != null)
    'exactMatchMetricValue': exactMatchMetricValue!.toJson(),
  if (bleuMetricValue != null) 'bleuMetricValue': bleuMetricValue!.toJson(),
  if (rougeMetricValue != null)
    'rougeMetricValue': rougeMetricValue!.toJson(),
  if (aggregationMetric.isNotDefault)
    'aggregationMetric': aggregationMetric.toJson(),
};