How can it be wrong, a simple JSON read
$pingluninfo = << <>
{
"title": "123",
"url": "Http://localhost/?p=9",
"Ttime": 1401327899094,
"SourceID": "9",
"ParentID": "0",
"CategoryID": "",
"ownerID": "",
"Metadata": "",
"Comments": [
{
"Cmtid": "358",
"CTime": 1401327899094,
"Content": "August 1, 2013 18:36:29 O (∩_∩) o~",
"Replyid": "0",
"User": {
"userid": "1",
"Nickname": "Admin",
"Usericon": "",
"Userurl": "",
"Usermetadata": {
"Area": "Beijing",
"Gender": "1",
"KK": "",
"Level": 1
}
},
"IP": "127.0.0.1",
"UserAgent": "mozilla/5.0 (Windows NT 6.1; rv:22.0) gecko/20100101 firefox/22.0 ",
"Channeltype": "1",
"From": "",
"Spcount": "",
"Opcount": "",
"Attachment": [
{
"Type": 1,
"desc": "",
"url": "Http://img.sohu.itc/xxxx"
}
]
}
]
}
EOT;
$pingluninfo = Json_decode ($pingluninfo, true);
if (! $pingluninfo) {
Die (' Wrong data format ');
}
?>
Always output the wrong data format
------to solve the idea----------------------
!--? php
$pingluninfo = <<
{
"title": "123",
"url": "HT Tp://localhost/?p=9 ",
" ttime ": 1401327899094,
" SourceID ":" 9 ",
" ParentID ":" 0 ",
" CategoryID ":" ", br> "ownerID": "",
"metadata": "",
"comments": [
{
"Cmtid": "358",
" CTime ": 1401327899094,
" content ":" August 1, 2013 18:36:29 O (∩_∩) o~ ",
" Replyid ":" 0 ",
"User": {
"userid": "1",
"nickname": "admin",
"Usericon": "",
"Userurl": "",
"Usermetadata": {
"area": "Beijing",
"Gender": "1",