Why cannot this string be json_decode?

Source: Internet
Author: User
Please refer to the following link for more information: why can't json_decode [{desc: 1111, imgurl: .dataattachments201404225355e745ae166.jpg}, {desc: 333333, imgurl: signature}, and {desc?
[{"Desc": "1111", "imgurl ":". /data/attachments/20140422/5355 e745ae166.jpg "},{" desc ":" 333333 "," imgurl ":". /data/attachments/20140422/5355 e745c8a40.jpg "},{" desc ":" u306e333 "," imgurl ":". /data/attachments/201


The data is first stored in the database by json_encode, but the json_decode obtained from the database returns NULL.

Later, I tried to use serialize to save the data to the database and fetch it from the database. unserialize returned bool (false)

The operation in the same file should not involve encoding when it is stored in the database or retrieved from the database. ask the possible reasons.
------ Solution --------------------
Incomplete string, less "]}
------ Solution --------------------
Also, your database field length is insufficient.
------ Solution --------------------
Are you sure you have cut off your hand by mistake?

Paste the data obtained from the database
------ Solution --------------------
Paste the attributes of the fields stored in json data? Whether the field is truncated.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.