Returns the JSON representation of the webhook.
976101
def to_json(self):
        

        result = super(Webhook, self).to_json()
        result.update({
            'name': self.name,
            'url': self.url,
            'topics': self.topics,
            'httpBasicUsername': self.http_basic_username,
            'headers': self.headers
        })

        if self.filters:
            result.update({'filters': self.filters})

        if self.transformation:
            result.update({'transformation': self.transformation})

        return result
453638
def json_data(self):
        """"""
        return {
            "vector_id": self.vector_id,
            "origin_id": self.origin_id,
            "destination_id": self.destination_id,
            "info_id": self.info_id,
            "network_id": self.network_id,
            "receive_time": self.receive_time,
            "status": self.status,
        }
879149
def json(self):
        '''  '''
        ctype = self.environ.get('CONTENT_TYPE', '').lower().split(';')[0]
        if ctype == 'application/json':
            b = self._get_body_string()
            if not b:
                return None
            return json_loads(b)
        return None
924130
def json(self, **kwargs):
        '''
        
        '''
        body = self._decompress(self.encoding)
        return _json.loads(body, **kwargs)
434460
def to_json(self):
        
        endpoints = []
        for endpoint in self.endpoints:
            list_fields = endpoint.fields
            resource_type = endpoint.Meta.resource_type
            table = endpoint.Meta.table

            data = endpoint.to_dict()
            data['fields'] = resource_type.get_type_of_fields(
                list_fields,
                table,
            )
            endpoints.append(data)

        data = {
            'title': self.title,
            'endpoints': sorted(endpoints, key=lambda x: x['name']),
        }

        return json.dumps(data)
78657
def to_json(self):
    """"""
    new_pos = self._blob_reader.tell()
    if self._has_iterated:
      new_pos -= 1
    return {self.BLOB_KEY_PARAM: self._blob_key,
            self.INITIAL_POSITION_PARAM: new_pos,
            self.END_POSITION_PARAM: self._end_position}
1373524
def to_JSON(self):
        
        return json.dumps({"station_ID": self._station_ID,
                            "interval": self._interval,
                            "reception_time": self._reception_time,
                            "measurements": self._measurements
                           })
114802
def json(self):
        
        return json.dumps(self.dict_rules,
                          sort_keys=True,
                          indent=2,
                          separators=(',', ': '))
185061
def json(self):
        """"""
        if 'json' not in self.environ.get('CONTENT_TYPE', ''):
            raise BadRequest('Not a JSON request')
        try:
            return loads(self.data)
        except Exception:
            raise BadRequest('Unable to read JSON request')
98572
def get_json(self, nb=0):
        """"""
        return {i: self.stats_history[i].history_json(nb=nb) for i in self.stats_history}
594222
def to_json(self):
        

        result = super(ApiKey, self).to_json()
        result.update({
            'name': self.name,
            'description': self.description,
            'accessToken': self.access_token,
            'environments': [e.to_json() for e in self.environments]
        })
        return result
1009465
def to_json(self):
    
    return {
        "build_number": self._build_number,
        "commit_hash": self._commit_hash,
        "last_modified": self._last_modified,
        "location": self._location,
        "modified_by": self._modified_by,
        "status": self._status,
        "value": self._value,
        "version_id": self._version_id
    }
954945
def get_webhook(self):
        
        api = self._get_api(mds.NotificationsApi)
        return Webhook(api.get_webhook())
127638
def ToJson(self):
        
        obj = {
            'usage': self.Usage,
            'data': '' if not self.Data else self.Data.hex()
        }
        return obj
935166
def json(self):
        
        _json = json.loads(self.reader)
        if _json.get('error', None):
            raise HTTPError(_json['error']['errors'])
        return _json
1176117
def webhook_to_object(self, webhook):
        
        if isinstance(webhook, string_type):
            # If still JSON, convert to a Python dict
            webhook = json.dumps(webhook)

        # if a flask.Request object, try to convert that to a webhook
        if not isinstance(webhook, dict):
            webhook = get_webhook_from_request(webhook)

        try:
            webhook['api_url']
        except KeyError:
            raise InvalidWebhook

        payload = self.get(webhook['api_url'])

        return payload
622650
def version(self):
        """"""
        return self.get_json(URL_VERSION.format(self._url), astext=True)