I am using AJax to send a string to a server side PHP app.
When the PHP code receives this, AJax has made further escapes to special characters, and also removed stringify's escape of the lf. See attached image 'received-at-php'.
At the very least before I can use json_decode I have to remove the double quotes, see attached code part 2.
This will then give me almost the result I want... see image 'after-json-decode.png'.
But as you can see, because AJax stripped out the '\' for the u000a, i"m left with that in the middle.
What I've done seems very hackish and not correct.
How do I do this correctly, code examples please.
var newMess = new Object();
var toList = new Object();
toList = "63,64";
newMess["toList"] = toList;
newMess["subject"] = messSubject;
newMess["body"] = messContent;
var newMessToSend = JSON.stringify(newMess);
// code part 2 -- PHP
$tmp = str_replace("\\", "", $pNewmess);
$newMess = json_decode($tmp);