toJson method

Map<String, dynamic> toJson()

Serializes this instance to a JSON object.

Implementation

Map<String, dynamic> toJson() => {
      'op': type.name,
      'path': path,
      if (type != PatchOperationType.remove) 'value': value,
    };