QueryResult.fromJson constructor

QueryResult.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory QueryResult.fromJson(Map<String, dynamic> json) {
  return QueryResult(
    facetResults: (json['FacetResults'] as List?)
        ?.whereNotNull()
        .map((e) => FacetResult.fromJson(e as Map<String, dynamic>))
        .toList(),
    queryId: json['QueryId'] as String?,
    resultItems: (json['ResultItems'] as List?)
        ?.whereNotNull()
        .map((e) => QueryResultItem.fromJson(e as Map<String, dynamic>))
        .toList(),
    totalNumberOfResults: json['TotalNumberOfResults'] as int?,
  );
}