Is there a way to minimize a json in JsonResponse? By minimize I mean removing spaces etc.
Thanks to this I can save around 100KB on my server ;).
Example:
I have a json:
{"text1": 1324, "text2": "abc", "text3": "ddd"}
And I want to achieve something like this:
{"text1":1324,"text2":"abc","text3":"ddd"}
Now creating response looks like that:
my_dict = dict()
my_dict['text1'] = 1324
my_dict['text2'] = 'abc'
my_dict['text3'] = 'ddd'
return JsonResponse(my_dict, safe=False)