Home > Backend Development > PHP Tutorial > 请问这个字符串为什么不能json_decode

请问这个字符串为什么不能json_decode

WBOY
Release: 2016-06-13 11:55:20
Original
889 people have browsed it

请教这个字符串为什么不能json_decode

[{"desc":"1111","imgurl":"./data/attachments/20140422/5355e745ae166.jpg"},{"desc":"333333","imgurl":"./data/attachments/20140422/5355e745c8a40.jpg"},{"desc":"u306e333","imgurl":"./data/attachments/201
Copy after login
   

数据先是json_encode 存入数据库 但是从数据库取出来 json_decode 返回NULL

后来尝试使用serialize把数据存入数据库  从数据库取出来unserialize  返回 bool(false)

存入数据库 或者 从数据库取出来都是在同一个文件里操作 应该不存在编码的问题,请教一下可能是什么原因
------解决方案--------------------
字符串不全,少”  ] }
------解决方案--------------------
还有就是你数据库字段长度不足吧
------解决方案--------------------
手误还是确实截断了?

贴出从数据库取出来的数据
------解决方案--------------------
贴出 存入json数据的字段的属性?字段是否被截断。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template