The JSON string that is uploaded to Php via Ajax is sometimes added with a backslash "\" to escape, and the PHP process needs to remove the backslash first and then Json_decode.
$str = stripslashes ($_post[' json '));
Ps:php get crawl JSON how to remove the backslash before double quotes
You are not the standard JSON format data, you can first replace \ "" can be.
Then use the Json_decode () system function to convert it to a JSON object, if you want to convert to an array plus the second argument to true.
If the output is still null due to the existence of BOM header information,
Copy Code code as follows:
$arr = Json_decode (Trim ($json, Chr (239). chr (187). Chr (191)), true);
Conversion can be.
This article is complete, and I would like to help you in using PHP to remove the backslash in the JSON string and to remove the backslash before the double quotes.