toJson method
Implementation
@override
Object toJson() => {
if (pointwiseMetricResult case final pointwiseMetricResult?)
'pointwiseMetricResult': pointwiseMetricResult.toJson(),
if (pairwiseMetricResult case final pairwiseMetricResult?)
'pairwiseMetricResult': pairwiseMetricResult.toJson(),
if (exactMatchMetricValue case final exactMatchMetricValue?)
'exactMatchMetricValue': exactMatchMetricValue.toJson(),
if (bleuMetricValue case final bleuMetricValue?)
'bleuMetricValue': bleuMetricValue.toJson(),
if (rougeMetricValue case final rougeMetricValue?)
'rougeMetricValue': rougeMetricValue.toJson(),
if (aggregationMetric.isNotDefault)
'aggregationMetric': aggregationMetric.toJson(),
};