上的错误json.loads

2024-05-08 16:35:02 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我的JSON数据:

{
  "id": "474676675993584",
  "about": "Official Facebook Page of GITM IEEE Society.\nWe are based out of Gurgaon Institute of Technology and Management, Gurgaon.",
  "can_post": false,
  "category": "Organization",
  "category_list": [
    {
      "id": "198503866828628",
      "name": "Organization"
    }
  ],
  "checkins": 24,
  "country_page_likes": 478,
  "cover": 
             {
                  "cover_id": "601076406686943",
                  "offset_x": 0,
                  "offset_y": 28,
                  "source": "https://scontent.xx.fbcdn.net/hphotos-xtp1/t31.0-8/s720x720/10321662_601076406686943_419719677923907...",
                  "id": "601076406686943"
             },
  "has_added_app": false,
  "is_community_page": false,
  "is_published": true,
  "new_like_count": 3,
  "likes": 478,
  "link": "https://www.facebook.com/ieeegitm",
  "location": 
      {
          "city": "Gurgaon",
          "country": "India",
          "latitude": 28.288555,
          "longitude": 76.860245,
          "street": "Gurgaon Institute Of Technology & Management,Bilaspur-Tauru Road, Gurgaon (Haryana)",
          "zip": "122413"
      },
  "name": "GITM IEEE",
  "offer_eligible": true,
  "parking": 
      {
          "lot": 0,
          "street": 0,
          "valet": 0
      },
  "promotion_eligible": true,
  "talking_about_count": 2,
  "unread_message_count": 0,
  "unread_notif_count": 1,
  "unseen_message_count": 0,
  "username": "ieeegitm",
  "were_here_count": 24
}

当我试图对此执行json.loads时,会出现错误:

^{pr2}$

Tags: ofnameidfalsetruecountmanagementabout
1条回答
网友
1楼 · 发布于 2024-05-08 16:35:02

我想你还有一些额外的角色, 检查此工具:http://json.parser.online.fr/

我删除了多余的字符,我把它们从unicode解码成十六进制,这是字符代码:E28082。在

顺便说一句,我用空格代替了它。在

{
 "id": "474676675993584",
  "about": "Official Facebook Page of GITM IEEE Society.\nWe are based out of Gurgaon Institute of Technology and Management, Gurgaon.",
  "can_post": false,
  "category": "Organization",
"category_list":[{
      "id": "198503866828628",
      "name": "Organization"}],
  "checkins": 24,
  "country_page_likes": 478,
  "cover": 
             {
                  "cover_id": "601076406686943",
                  "offset_x": 0,
                  "offset_y": 28,
                  "source": "https://scontent.xx.fbcdn.net/hphotos-xtp1/t31.0-8/s720x720/10321662_601076406686943_419719677923907...",
                  "id": "601076406686943"
             },
  "has_added_app": false,
  "is_community_page": false,
  "is_published": true,
  "new_like_count": 3,
  "likes": 478,
  "link": "https://www.facebook.com/ieeegitm",
  "location": 
      {
          "city": "Gurgaon",
          "country": "India",
          "latitude": 28.288555,
          "longitude": 76.860245,
          "street": "Gurgaon Institute Of Technology & Management,Bilaspur-Tauru Road, Gurgaon (Haryana)",
          "zip": "122413"
  },
  "name": "GITM IEEE",
  "offer_eligible": true,
  "parking": 
      {
          "lot": 0,
          "street": 0,
          "valet": 0
},  "promotion_eligible": true,
  "talking_about_count": 2,
  "unread_message_count": 0,
  "unread_notif_count": 1,
  "unseen_message_count": 0,
  "username": "ieeegitm",
  "were_here_count": 24
}

如果你想自己看到这些字符,复制并粘贴到记事本++中以显示它们。在

相关问题 更多 >