该字符串{"foo":"\\"}是有效的 json,但似乎 php 无法对它进行 json 解码。
在 php 中运行以下命令:
php > $a = '{"foo":"\\"}';
php > var_dump(json_decode($a));
php shell code:1:
NULL
php > var_dump(json_last_error_msg());
php shell code:1:
string(53) "Control character error, possibly incorrectly encoded"
这里发生了什么事?
犯罪嫌疑人X