Serializing Django queryset to JSON: getting ...
https://www.py4u.net/discuss/223520Answer #1: Serializers are used to serialize the django models only. To serialize simple python data use the built-in json module: import json return JsonResponse (json.dumps (data), safe=True) Answered By: Richard. The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .