I'm passing a 'data' parameter to a php page using AJAX. The parameter is a JSON string like:
{"type":"value"}
I encode with encodeURIComponent JS function getting:
%7B%22type%22%3A%22value%22%7D
If I write by hand:
http://some_url/index.php?data=%7B%22type%22%3A%22value%22%7D
my "index.php" simply gets the parameters and "prints in the screen". The problem is I'm getting this which isn't a valid JSON to decode:
{\"type\":\"value\"}
Any help, thanks in advance