Dump raw JSON output of matching queryset objects.

        Returns:
            List of dicts.
504302
def dump(self):
        
        results = []
        for data in self.data():
            results.append(data)
        return results
1314743
def dumpJSON(self):
        
        g = get_root(self).globals
        return dict(
            RA=self.ra['text'],
            DEC=self.dec['text'],
            tel=g.cpars['telins_name'],
            alt=self._getVal(self.alt),
            az=self._getVal(self.az),
            secz=self._getVal(self.airmass),
            pa=self._getVal(self.pa),
            foc=self._getVal(self.focus),
            mdist=self._getVal(self.mdist)
        )
839820
def dumps(dict_data, ensure_ascii=True, indent=None,
          sort_keys=False, encoding='utf-8', **kwargs):
    

    return json.dumps(dict_data, default=json_default,
                      ensure_ascii=ensure_ascii, indent=indent,
                      sort_keys=sort_keys, encoding=encoding, **kwargs)
230060
def to_json(self):
    
    # Use the member variable (since we don't have access to the context) to
    # flush each pool to minimize the size of each filehandle before we
    # serialize it.
    for pool in self._pools:
      if pool is not None:
        pool.flush(True)
    return {"filehandles": pickle.dumps(self._filehandles)}
196983
def dump(self):
    """"""
    return json.dumps(
        self.primitive,
        sort_keys=True,
        ensure_ascii=False,
        separators=(',', ':'))
12150
def json(self):
        """"""
        if self.search_results is None:
            return None

        result = []
        for row in self.search_results['rows']:
            obj = {}
            for index in range(0, len(self.search_results['fields'])):
                obj[self.search_results['fields'][index]] = row[index]
            result.append(obj)

        return result
1003085
def serialize(self) -> dict:
        
        data = {**self}
        if "attachments" in self:
            data["attachments"] = json.dumps(self["attachments"])
        return data
812431
def write_dicts_to_json(self, data):
        
        with open(self.path, "w") as out:
            json.dump(
                data,  # data
                out,  # file handler
                indent=4, sort_keys=True  # pretty print
            )
132692
def to_json(self):
        
        data = dict(self.__dict__)
        data.pop('context',None)
        data['oauth'] = self.oauth.to_dict()
        data['cache'] = self.cache.to_dict()
        return json.dumps(data)
162943
def serialize(self):
        
        return json.dumps({
            "name": self.name,
            "ip": self.ip,
            "port": self.port
        }, sort_keys=True)
347934
def object(obj):
    
    if isinstance(obj, dict) or isinstance(obj, list):
        return json.dumps(obj)
    return obj
576604
def to_json(self, *args, **kwargs):
        
        return json.dumps(self.to_schema(), *args, **kwargs)
1213354
def dump_data(self, filename, queryset):
        
        with gzip.open(filename, "wb") as f:
            for outbound in queryset.iterator():
                data = OutboundArchiveSerializer(outbound).data
                data = JSONRenderer().render(data)
                f.write(data)
                f.write("\n".encode("utf-8"))
771921
def dump_json(data, indent=None):
    
    return json.dumps(data,
                      indent=indent,
                      ensure_ascii=False,
                      sort_keys=True,
                      separators=(',', ': '))
230191
def save_to_json(self):
        """"""
        requestvalues = {
            'Dataset': self.dataset,
            'Header' : self._get_item_array(self.header),
            'Filter' : self._get_item_array(self.filter),
            'Stub' : self._get_item_array(self.stub),
            'Frequencies': self.frequencies
        }
        return json.dumps(requestvalues)
482305
def json_dumps(o):
    """"""
    return json.dumps(o, indent=4, sort_keys=True, ensure_ascii=True,
                      separators=(',', ': ')).encode('ascii')
234354
def get_object_list_json(request):
    
    # TODO: Add to documentation
    if "f" in request.GET:
        field_list = request.GET.getlist("f")
    else:
        field_list = None

    result_dict = d1_gmn.app.views.util.query_object_list(request, "object_list_json")
    result_dict["fields"] = field_list
    result_dict["objects"] = d1_gmn.app.sysmeta_extract.extract_values_query(
        result_dict["query"], field_list
    )
    del result_dict["query"]

    return django.http.HttpResponse(
        d1_common.util.serialize_to_normalized_pretty_json(result_dict),
        d1_common.const.CONTENT_TYPE_JSON,
    )