請問這個字串為什麼不能json_decode

來源:互聯網
上載者:User
請教這個字串為什麼不能json_decode
[{"desc":"1111","imgurl":"./data/attachments/20140422/5355e745ae166.jpg"},{"desc":"333333","imgurl":"./data/attachments/20140422/5355e745c8a40.jpg"},{"desc":"u306e333","imgurl":"./data/attachments/201


資料先是json_encode 存入資料庫 但是從資料庫取出來 json_decode 返回NULL

後來嘗試使用serialize把資料存入資料庫 從資料庫取出來unserialize 返回 bool(false)

存入資料庫 或者 從資料庫取出來都是在同一個檔案裡操作 應該不存在編碼的問題,請教一下可能是什麼原因
------解決方案--------------------
字串不全,少” ] }
------解決方案--------------------
還有就是你資料庫欄位長度不足吧
------解決方案--------------------
手誤還是確實截斷了?

貼出從資料庫取出來的資料
------解決方案--------------------
貼出 存入json資料的欄位的屬性?欄位是否被截斷。
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    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.