I get the data from the table in the following way:
def get_users(request): users = User.objects.all() data = serializers.serialize('json', users) return HttpResponse(data, content_type='application/json') And in response, I get the following:
{"model": "api.user", "pk": 1, "fields": {"first_name": "Vlad", "second_name": "Sapozhnikov", "age": 21}} I don't understand where the model, pk and fields fields come from and is there any way to get json without them? Thanks in advance for your reply, I am new to Django.