Get a converted list of Funders as JSON dict.
171334
def iter_funders(self):
        """"""
        root = self.doc_root
        funders = root.findall('./skos:Concept', namespaces=self.namespaces)
        for funder in funders:
            funder_json = self.fundrefxml2json(funder)
            yield funder_json
1153597
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self,
                   'matching_results') and self.matching_results is not None:
            _dict['matching_results'] = self.matching_results
        if hasattr(self, 'hits') and self.hits is not None:
            _dict['hits'] = [x._to_dict() for x in self.hits]
        return _dict
961272
def resources_to_json(resources):
    
    return {
        docname: clean_resource_json(resource.__json__(resources))
        for (docname, resource)
        in resources.items()
    }
226646
def _to_json(self):
        
        return dict(( (k, v) for k, v in self.__dict__.iteritems() if k != 'server'))
233085
def to_dict(self):
        """"""
        return {
            'observable': self.observable,
            'path': self.path,
            'type': self.type,
            'content_type': self.content_type
        }
650614
def to_json(self, incl_uniqueid=False):
        
        lst = []
        for context in _contexts:
            lst += [v.to_json(incl_uniqueid=incl_uniqueid)
                    for v in self.filter(context=context,
                                         check_visible=False,
                                         check_default=False).to_list()]
        return lst
921854
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'party') and self.party is not None:
            _dict['party'] = self.party
        if hasattr(self, 'importance') and self.importance is not None:
            _dict['importance'] = self.importance
        if hasattr(self, 'role') and self.role is not None:
            _dict['role'] = self.role
        if hasattr(self, 'addresses') and self.addresses is not None:
            _dict['addresses'] = [x._to_dict() for x in self.addresses]
        if hasattr(self, 'contacts') and self.contacts is not None:
            _dict['contacts'] = [x._to_dict() for x in self.contacts]
        return _dict
180206
def to_dict(self):
        """"""
        data = {'aid': self.aid, 'number': self.number, 'element': self.element}
        for coord in {'x', 'y', 'z'}:
            if getattr(self, coord) is not None:
                data[coord] = getattr(self, coord)
        if self.charge is not 0:
            data['charge'] = self.charge
        return data
425347
def list_to_json(source_list):
    
    result = []
    for item in source_list:
        result.append(item.to_json())
    return result
355831
def to_json(self) -> dict:
        ''''''

        d = self.__dict__
        d['p2th_wif'] = self.p2th_wif
        return d
191272
def download_organizations():
    ""

    response = requests.get(URL)
    data = response.json()
    organizations = [organization["properties"] for organization in data["features"]]
    return rows.import_from_dicts(organizations)
224995
def get_top_gainers(self, as_json=False):
        
        url = self.top_gainer_url
        req = Request(url, None, self.headers)
        # this can raise HTTPError and URLError
        res = self.opener.open(req)
        # for py3 compat covert byte file like object to
        # string file like object
        res = byte_adaptor(res)
        res_dict = json.load(res)
        # clean the output and make appropriate type conversions
        res_list = [self.clean_server_response(item) for item in res_dict['data']]
        return self.render_response(res_list, as_json)
1046248
def to_json(self):
        """"""
        return {
            'solar_model': self.solar_model,
            'month': self.month,
            'day_of_month': self.day_of_month,
            'daylight_savings_indicator': self.daylight_savings_indicator,
            'beam_shced': self.beam_shced,
            'diff_sched': self.diff_sched
        }
141354
def to_json(self):
        """"""
        return {
            'solar_model': self.solar_model,
            'month': self.month,
            'day_of_month': self.day_of_month,
            'tau_b': self.tau_b,
            'tau_d': self.tau_d,
            'daylight_savings_indicator': self.daylight_savings_indicator
        }
633463
def bulk_of_jsons(d):
    ""
    def _f(b):
        for index, item in enumerate(b):
            if item is not None:
                b[index] = d(item)
        return b
    return _f
513296
def unpack_rsp(cls, rsp_pb):
        """"""
        if rsp_pb.retType != RET_OK:
            return RET_ERROR, rsp_pb.retMsg, None

        raw_funds = rsp_pb.s2c.funds
        accinfo_list = [{
            'power': raw_funds.power,
            'total_assets': raw_funds.totalAssets,
            'cash': raw_funds.cash,
            'market_val': raw_funds.marketVal,
            'frozen_cash': raw_funds.frozenCash,
            'avl_withdrawal_cash': raw_funds.avlWithdrawalCash,
        }]
        return RET_OK, "", accinfo_list
604850
def to_dict(self):
        """"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(Payment, dict):
            for key, value in self.items():
                result[key] = value

        return result