19

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?

1 Answer 1

35
from django.http import JsonResponse

def someView(request):
    ...
    return JsonResponse(someDictionary)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.