Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django version of flask.jsonify jsonify

Tags:

json

django

I am currently trying to migrate a project from flask over to Django as practice and just to get it working on Django... I was wondering if there is a method within Django that performs the job of flask.jsonify?

If not, how else would you recommend I can emulate the same functionality?

like image 282
ajl123 Avatar asked Jan 24 '16 02:01

ajl123


1 Answers

from django.http import JsonResponse

def someView(request):
    ...
    return JsonResponse(someDictionary)
like image 143
James Evans Avatar answered Nov 12 '22 00:11

James Evans