toJson method
Implementation
@visibleForTesting
Map<String, dynamic> toJson() => {
"first": first.toJson(),
"second": second.toJson(),
"similarity": similarity,
"score": score,
"error": error?.toJson(),
}.clearNulls();