Serializes an object to a map representation.
@override Map<String, dynamic> toJson() => { 'collection': collection, 'query': query, 'filter': filter?.toJson(), 'options': options.toJson(), };