json_decode($str)返回NULL的一些原因 json_decode($str)返回NULL的一些原因: 1.$str只能UTF-8编码 2.元素最后不能有逗号(与php的array不同) 3.元素不能使用单引号 4.元素值中间不能有空格和 ,必须替换