SearchResult.fromJson constructor

SearchResult.fromJson(
  1. Map json_
)

Implementation

SearchResult.fromJson(core.Map json_)
    : this(
        clusteredResults: json_.containsKey('clusteredResults')
            ? (json_['clusteredResults'] as core.List)
                .map((value) => SearchResult.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        debugInfo: json_.containsKey('debugInfo')
            ? ResultDebugInfo.fromJson(
                json_['debugInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        metadata: json_.containsKey('metadata')
            ? Metadata.fromJson(
                json_['metadata'] as core.Map<core.String, core.dynamic>)
            : null,
        snippet: json_.containsKey('snippet')
            ? Snippet.fromJson(
                json_['snippet'] as core.Map<core.String, core.dynamic>)
            : null,
        title:
            json_.containsKey('title') ? json_['title'] as core.String : null,
        url: json_.containsKey('url') ? json_['url'] as core.String : null,
      );