Ask why this string is not Json_decode

Source: Internet
Author: User
[{"desc": "1111", "Imgurl": "./data/attachments/20140422/5355e745ae166.jpg"},{"desc": "333333", "Imgurl": "./data/ Attachments/20140422/5355e745c8a40.jpg "},{" desc ":" u306e333 "," Imgurl ":"./data/attachments/201


The data is first json_encode into the database but taken out of the database Json_decode returns null

Later try to use Serialize to save the data to the database from the database unserialize return bool (FALSE)

In the database or out of the database is in the same file operation should not have the problem of coding, please ask what may be the reason


Reply to discussion (solution)

String not complete, less "]}

[    {        "desc": "1111",        "Imgurl": "./data/attachments/20140422/5355e745ae166.jpg"    },    {        "desc ":" 333333 ","        Imgurl ":"./data/attachments/20140422/5355e745c8a40.jpg "    },    {        " desc ":" u306e333 ",        "Imgurl": "./data/attachments/201"    }]

And there's your database, the length of the word is not enough

Is the hand or did it be truncated?

Post data taken from a database

Paste the properties of a field stored in JSON data? Whether the field is truncated.

The database field is set too short for truncation, thank you for your kind help

  • 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.