Via JavaScript I'm able to store a cookie with JSON.stringify(), which stores a cookie directly as I.e.
'[{"n":"50fb0d0cc1277d182f000002","q":2},{"n":"50fb0d09c1277d182f000001","q":1},{"n":"50fb0d06c1277d182f000000","q":1}]
I'm now passing this through a rest API, where the other endpoint receives then needs to re-corporate into the same cookie key and value on the server end. I do this using PHP's set cookie. I'm able to pass through the vars correctly, however when setting cookie with the JSON value it keeps becoming urldecoded, I'm storing it as a straight string and it still becomes I.e:
%5B%7B%22n%22%3A%2250fb0d9dc1277d1b2f000003%22%2C%22q%22%3A3%7D%5D
Any ideas? why this is storing as a decoded value?