We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there! Very nice tool, thanks!
Would this this library also work with Django's JsonResponse?
JsonResponse
According to Django's doc: https://docs.djangoproject.com/en/2.0/ref/request-response/#jsonresponse-objects an encoder can be set.
response = JsonResponse(data, encoder=MyJSONEncoder)
For example, in views.py:
views.py
from django.http import JsonResponse from .models import User from .serializers import UserSerializer def user_view(request): user = User.objects.get(pk=1) return JsonResponse(UserSerializer(user).data, encoder=CamelCaseJSONEncoder)
That'd be pretty elegant... ;)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi there! Very nice tool, thanks!
Would this this library also work with Django's
JsonResponse
?According to Django's doc:
https://docs.djangoproject.com/en/2.0/ref/request-response/#jsonresponse-objects
an encoder can be set.
For example, in
views.py
:That'd be pretty elegant... ;)
The text was updated successfully, but these errors were encountered: