I've been trying to send a JSON string to PHP server like this:
$.ajax({
type: "POST",
url: "themes.php?page=themeoptions",
data: {structure : JSON.stringify(structure)},
});
However, every quotation mark from the string I send is escaped automatically, so I can't decode it in PHP with json_decode(). I could remove all the escape characters, but I really doubt that this way of sending JSON data to server is safe.
So, I was wondering if you have any ideas on how to do that in a simple and safe (not necessarily bulletfroof) way?
Thank you!