SearchResponse.fromJson constructor

SearchResponse.fromJson(
  1. Map json_
)

Implementation

SearchResponse.fromJson(core.Map json_)
    : this(
        debugInfo: json_.containsKey('debugInfo')
            ? ResponseDebugInfo.fromJson(
                json_['debugInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        errorInfo: json_.containsKey('errorInfo')
            ? ErrorInfo.fromJson(
                json_['errorInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        facetResults: json_.containsKey('facetResults')
            ? (json_['facetResults'] as core.List)
                .map((value) => FacetResult.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        hasMoreResults: json_.containsKey('hasMoreResults')
            ? json_['hasMoreResults'] as core.bool
            : null,
        queryInterpretation: json_.containsKey('queryInterpretation')
            ? QueryInterpretation.fromJson(json_['queryInterpretation']
                as core.Map<core.String, core.dynamic>)
            : null,
        resultCountEstimate: json_.containsKey('resultCountEstimate')
            ? json_['resultCountEstimate'] as core.String
            : null,
        resultCountExact: json_.containsKey('resultCountExact')
            ? json_['resultCountExact'] as core.String
            : null,
        resultCounts: json_.containsKey('resultCounts')
            ? ResultCounts.fromJson(
                json_['resultCounts'] as core.Map<core.String, core.dynamic>)
            : null,
        results: json_.containsKey('results')
            ? (json_['results'] as core.List)
                .map((value) => SearchResult.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        spellResults: json_.containsKey('spellResults')
            ? (json_['spellResults'] as core.List)
                .map((value) => SpellResult.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        structuredResults: json_.containsKey('structuredResults')
            ? (json_['structuredResults'] as core.List)
                .map((value) => StructuredResult.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );