I am trying to send some JSON to my django app in a query string by using encodeURIComponent()
my server enpoint receives the data just fine as I can print it t
QueryDict class is a subclass of regular Python dictionary, except that it handles multiple values for a same key (see MultiValueDict implementation).
If you want to dump it to a string, just use json.dumps()
:
json.dumps(my_query_dict)
There is also a relevant dict() method:
QueryDict.dict()
Returns dict representation of QueryDict.