Possible Duplicate:
Why does php insert backslash while replacing double quotes
How can you remove the backslashes from a JSON.stringify()
after it is sent with AJAX?
The JSON before I send it does not have the backslashes, and afterwards it does. Are the backslashes always added by PHP when it encounters double quotes in a string?
Post-ajax output of JSON.stringify()
:
[
{
\"firstname\":\"John\",
\"lastname\":\"Doe\"
},
{
\"firstname\":\"Jane\",
\"lastname\":\"Smith\"
}
]