I\'m trying to encode an object in a Python script and set it as a cookie so I can read it with client-side JavaScript.
I\'ve run into problems every way I\'ve tried
On the Python side:
json.dumps
.replace(' ', '%20')
urllib.parse.quote_plus()
On the JavaScript side:
decodeURIComponent()
JSON.parse
This seems to be the cleanest way I've found.