toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'passages': passages.map((p) => p.toJson()).toList(),
      if (metadata != null) 'metadata': metadata,
      if (totalMatches != null) 'totalMatches': totalMatches,
    };