def _from_dict(cls, _dict):
        """Initialize a TopHitsResults object from a json dictionary."""
        args = {}
        if 'matching_results' in _dict:
            args['matching_results'] = _dict.get('matching_results')
        if 'hits' in _dict:
            args['hits'] = [
                QueryResult._from_dict(x) for x in (_dict.get('hits'))
            ]
        return cls(**args)
def _from_dict ( cls , _dict ) : args = { } if 'matching_results' in _dict : args [ 'matching_results' ] = _dict . get ( 'matching_results' ) if 'hits' in _dict : args [ 'hits' ] = [ QueryResult . _from_dict ( x ) for x in ( _dict . get ( 'hits' ) ) ] return cls ( ** args )
Initialize a TopHitsResults object from a json dictionary.