您的当前位置:首页>全部文章>文章详情

php中json_decode解析出来是NULL

发表于:2023-01-12 14:32:06浏览:136次TAG: #PHP

问题

json_decode解析出来是NULL,但是明明就是json串,原因是:编码转义问题

解决

先经过stripcslashes处理后即可使用

$routes = stripcslashes($routes);
$routes = json_decode($routes,true);