Community

How to Return JSON-Encoded Response

(Vitor Freitas) Since version 1.7, Django counts with the built-in JsonResponse class, which is a subclass of HttpResponse. Its default Content-Type header is set to application/json, which is really convenient. It also comes with a JSON encoder, so you don’t need to serialize the data before return

Read More - Register for Free Membership