Get a JSON-ready representation of this Email.

        :returns: This Email, ready for use in a request body.
        :rtype: dict
196554
def get(self):
        
        email = {}
        if self.name is not None:
            email["name"] = self.name

        if self.email is not None:
            email["email"] = self.email
        return email
602662
def to_json(self) -> Mapping:
        
        return {str(x): str(y) for x, y in self.items()}
522561
def ToJson(self):
        
        jsn = super(PublishTransaction, self).ToJson()
        jsn['contract'] = {}
        jsn['contract']['code'] = self.Code.ToJson()
        jsn['contract']['needstorage'] = self.NeedStorage
        jsn['contract']['name'] = self.Name.decode('utf-8')
        jsn['contract']['version'] = self.CodeVersion.decode('utf-8')
        jsn['contract']['author'] = self.Author.decode('utf-8')
        jsn['contract']['email'] = self.Email.decode('utf-8')
        jsn['contract']['description'] = self.Description.decode('utf-8')
        return jsn
705291
def to_json(self):
        
        return {
            'name': self.name,
            'segments': [segment.to_json() for segment in self.segments],
            'meta': self.meta
            }
22701
def __json(self):
        
        if self.exclude_list is None:
            self.exclude_list = []
        fields = {}
        for key, item in vars(self).items():
            if hasattr(self, '_sa_instance_state'):
                # load only deferred objects
                if len(orm.attributes.instance_state(self).unloaded) > 0:
                    mapper = inspect(self)
                    for column in mapper.attrs:
                        column.key
                        column.value
            if str(key).startswith('_') or key in self.exclude_list:
                continue
            fields[key] = item
        obj = Json.safe_object(fields)
        return str(obj)
530976
def userToJson(user):
    
    obj = {
        'id': user.id,
        'username': user.username,
        'name': user.get_full_name(),
        'email': user.email,
    }

    return obj
591990
def to_json(self):
        
        res = dict()
        res['Count'] = self.count
        res['Messages'] = self.messages
        res['ForcedState'] = self.forced
        res['ForcedKeyboard'] = self.keyboard
        res['Entities'] = list()
        for item in self.entities:
            res['Entities'].append(item.to_json())
        res['ForcedMessage'] = self.forced_message
        return res
42896
def json(self):
        
        return json.dumps(self.terms, indent=4, sort_keys=True,
                          default=operator.attrgetter("__deref__"))
700570
def json(self):
        

        if self.fresh():
            return self.__cached_json
        # noinspection PyAttributeOutsideInit
        self.__last_read_time = time.time()
        self.__cached_json = self._router.get_instance(org_id=self.organizationId, instance_id=self.instanceId).json()

        return self.__cached_json
610756
def data(self):
        
        if self.request.method == 'GET':
            return self.request.GET
        else:
            assert self.request.META['CONTENT_TYPE'].startswith('application/json')
            charset = self.request.encoding or settings.DEFAULT_CHARSET
            return json.loads(self.request.body.decode(charset))
1371785
def to_JSON(self):
        
        return json.dumps({"reference_time": self._reference_time,
                           "location": json.loads(self._location.to_JSON()),
                           "value": self._value,
                           "reception_time": self._reception_time,
                           })
875553
def mail_partial_json(self):
        
        if self.mail_partial.get("date"):
            self._mail_partial["date"] = self.date.isoformat()
        return json.dumps(self.mail_partial, ensure_ascii=False, indent=2)
848451
def search(self):
        
        requests = self._format()
        serps = self._fetch(requests)
        urls = self._process(serps)
        details = self._fetch(urls)
        emails = self._extract()
        return {'emails': emails, 'processed': len(self.data)}
845570
def json(self):
        
        try:
            return json.loads(self.text)
        except Exception as e:
            raise ContentDecodingError(e)
673451
def to_JSON(self):
        
        return json.dumps({"reference_time": self._reference_time,
                           "location": json.loads(self._location.to_JSON()),
                           "interval": self._interval,
                           "co_samples": self._co_samples,
                           "reception_time": self._reception_time,
                           })
767746
def json(self):
        
        try:
            return self._json
        except AttributeError:
            try:
                self._json = json.loads(self.text)
                return self._json
            except:  # noqa e722
                raise RequestInvalidJSON("Invalid JSON received")
1373524
def to_JSON(self):
        
        return json.dumps({"station_ID": self._station_ID,
                            "interval": self._interval,
                            "reception_time": self._reception_time,
                            "measurements": self._measurements
                           })