Dumps object fields into a JSON formatted string

        :returns: the JSON string
439401
def to_JSON(self):
        
        return json.dumps({"interval": self._interval,
                           "reception_time": self._reception_time,
                           "Location": json.loads(self._location.to_JSON()),
                           "weathers": json.loads("[" + \
                                ",".join([w.to_JSON() for w in self]) + "]")
                           })
807202
def serialize(objects=None):
    

    return serializers.serialize(
        "json",
        objects,
        ensure_ascii=True,
        use_natural_foreign_keys=True,
        use_natural_primary_keys=False,
    )
937656
def serialize(self):
        
        return {
            "uuid": self.uuid, "type": self.type, "instance_id": self.instance_id,
            "prepared": self.prepared, "creation_time": self.creation_time,
            "data": self.data
        }
579178
def json_dumps(self, obj):
        """"""
        return json.dumps(obj, sort_keys=True, indent=4, separators=(',', ': '))
998734
def json_dumps(cls, obj, **kwargs):
        
        if 'cls' not in kwargs:
            kwargs['cls'] = cls.json_encoder
        return json.dumps(obj, **kwargs)
370940
def to_jsondict(self):
        
        body = {"oxm_fields": [ofproto.oxm_to_jsondict(k, uv) for k, uv
                               in self._fields2],
                "length": self.length,
                "type": self.type}
        return {self.__class__.__name__: body}
289173
def to_JSON(self):
        
        return json.dumps({'name': self._name,
                         'coordinates': {'lon': self._lon,
                                         'lat': self._lat
                                        },
                         'ID': self._ID,
                         'country': self._country})
945315
def _to_json(self):
        
        json_list = [{"Assignment": peak.assignments_list, "Dimensions": peak.chemshifts_list} for peak in self]
        return json.dumps(json_list, sort_keys=True, indent=4)
351389
def json(self):
        
        json_dumps = json.dumps(
            self.dict,
            indent=2,
            sort_keys=True,
            separators=(',', ': '),
            cls=MetadataEncoder
        )
        if not json_dumps.endswith('\n'):
            json_dumps += '\n'
        return json_dumps
776193
def to_json(self, *args, **kwargs):
        """"""
        return json.dumps(self.serialize(), *args, **kwargs)
1330999
def asJSON(self):
        
        value = self._json
        if value is None:
            value = json.dumps(self.asDictionary,
                               default=_date_handler)
            self._json = value
        return self._json
1237671
def write_pretty_dict_str(out, obj, indent=2):
    """"""
    json.dump(obj,
              out,
              indent=indent,
              sort_keys=True,
              separators=(',', ': '),
              ensure_ascii=False,
              encoding="utf-8")
586964
def to_json(self):
        """"""

        j = {}
        for p in self.properties:
            j[p] = getattr(self, p)

        return json.dumps(j)
347934
def object(obj):
    
    if isinstance(obj, dict) or isinstance(obj, list):
        return json.dumps(obj)
    return obj
1003085
def serialize(self) -> dict:
        
        data = {**self}
        if "attachments" in self:
            data["attachments"] = json.dumps(self["attachments"])
        return data
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)
1328387
def to_json(self, *args, **kwargs):
        
        return json.dumps(self.serialized, *args, **kwargs)