将数据先进行htmlspecialchars_decode,在执行json_decode,因为有的时候json字符串中有非法字符导致解析失败。
<?php
$jsonstr="\\";
json_decode(htmlspecialchars_decode($jsonstr));
网友回复
将数据先进行htmlspecialchars_decode,在执行json_decode,因为有的时候json字符串中有非法字符导致解析失败。
<?php
$jsonstr="\\";
json_decode(htmlspecialchars_decode($jsonstr));
网友回复