toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'schemaVersion': schemaVersion,
    if (sources.isNotEmpty)
      'sources': sources.map((s) => s.toJson()).toList(),
    if (retriever != null) 'retriever': retriever!.toJson(),
    if (index != null) 'index': index!.toJson(),
  };
}