def get_json(self, request):
        paginator, page, items = self.get_items(request)
        if type(items) != ValuesQuerySet:
            items = items.values()
        data = {
            'page': int(page.number),
            'total': int(paginator.num_pages),
            'rows': [obj for obj in items],
            'records': int(paginator.count),
            }
        return json_encode(data)
dataset/ETHPy150Open gerry/django-jqgrid/jqgrid.py/JqGrid.get_json/original