toJson method

  1. @override
Map<String, Object?> toJson()

Returns this as a serializable JSON value.

Implementation

@override
Map<String, Object?> toJson() => {
      'runtimeType': 'YMapDelta',
      'action': action.toJson(),
      'old-value': (oldValue == null
          ? const None().toJson()
          : Option.fromValue(oldValue).toJson((some) => some.toJson())),
      'new-value': (newValue == null
          ? const None().toJson()
          : Option.fromValue(newValue).toJson((some) => some.toJson())),
    };