toJson method
Implementation
Map<String, dynamic> toJson() {
final comparator = this.comparator;
final key = this.key;
final value = this.value;
return {
if (comparator != null) 'Comparator': comparator.toValue(),
if (key != null) 'Key': key,
if (value != null) 'Value': value,
};
}