toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (type.isNotDefault) 'type': type.toJson(),
  if (predictions.isNotDefault) 'predictions': encodeList(predictions),
  if (groundTruths.isNotDefault) 'groundTruths': encodeList(groundTruths),
  if (dataItemPayload != null) 'dataItemPayload': dataItemPayload!.toJson(),
  if (evaluatedDataItemViewId.isNotDefault)
    'evaluatedDataItemViewId': evaluatedDataItemViewId,
  if (explanations.isNotDefault) 'explanations': encodeList(explanations),
  if (errorAnalysisAnnotations.isNotDefault)
    'errorAnalysisAnnotations': encodeList(errorAnalysisAnnotations),
};