将JSON文件加载到Python 3.6中

将JSON文件加载到Python 3.6中,python,json,Python,Json,我正试图将一个包含许多tweet的JSON文件加载到Python中,但我总是收到一个错误,上面说: ValueError(errmsg("Extra data", s, end, len(s))) 这是Json文件: { "contributors": null, "coordinates": null, "created_at": "Thu Feb 01 14:02:44 +0000 2018", "entities": { "hashtags

我正试图将一个包含许多tweet的JSON文件加载到Python中,但我总是收到一个错误,上面说:

ValueError(errmsg("Extra data", s, end, len(s)))
这是Json文件:

{
    "contributors": null,
    "coordinates": null,
    "created_at": "Thu Feb 01 14:02:44 +0000 2018",
    "entities": {
        "hashtags": [
            {
                "indices": [
                    100,
                    114
                ],
                "text": "البلطجي_جبران"
            },
            {
                "indices": [
                    115,
                    132
                ],
                "text": "نبيه_بري_خط_احمر"
            }
        ],
        "symbols": [],
        "urls": [],
        "user_mentions": []
    },
    "favorite_count": 0,
    "favorited": false,
    "geo": null,
    "id": 959064478078955520,
    "id_str": "959064478078955520",
    "in_reply_to_screen_name": null,
    "in_reply_to_status_id": null,
    "in_reply_to_status_id_str": null,
    "in_reply_to_user_id": null,
    "in_reply_to_user_id_str": null,
    "is_quote_status": false,
    "lang": "ar",
    "metadata": {
        "iso_language_code": "ar",
        "result_type": "recent"
    },
    "place": null,
    "retweet_count": 0,
    "retweeted": false,
    "source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
    "text": "لو كانت حتخلص هيك من الاول بهالبساطة، ليش لتروعوا الامنين وتشلوا حياة الناس. وين الاعتذار المنتظر. ##البلطجي_جبران #نبيه_بري_خط_احمر",
    "truncated": false,
    "user": {
        "contributors_enabled": false,
        "created_at": "Wed Sep 28 16:22:51 +0000 2016",
        "default_profile": true,
        "default_profile_image": false,
        "description": "طالب هندسة ميكانيكية وطالب في كلية الحقوق _ العلوم السياسية..مهتم بالأحداث السياسة وبقضايا المجتمع..محب للأدب والثقافة الإسلامية",
        "entities": {
            "description": {
                "urls": []
            }
        },
        "favourites_count": 99,
        "follow_request_sent": false,
        "followers_count": 32,
        "following": false,
        "friends_count": 94,
        "geo_enabled": false,
        "has_extended_profile": true,
        "id": 781167295645245440,
        "id_str": "781167295645245440",
        "is_translation_enabled": false,
        "is_translator": false,
        "lang": "en",
        "listed_count": 0,
        "location": "Lebanon",
        "name": "Mujahed Dkmak",
        "notifications": false,
        "profile_background_color": "F5F8FA",
        "profile_background_image_url": null,
        "profile_background_image_url_https": null,
        "profile_background_tile": false,
        "profile_banner_url": "https://pbs.twimg.com/profile_banners/781167295645245440/1517268329",
        "profile_image_url": "http://pbs.twimg.com/profile_images/958118925824352256/_oZgUrap_normal.jpg",
        "profile_image_url_https": "https://pbs.twimg.com/profile_images/958118925824352256/_oZgUrap_normal.jpg",
        "profile_link_color": "1DA1F2",
        "profile_sidebar_border_color": "C0DEED",
        "profile_sidebar_fill_color": "DDEEF6",
        "profile_text_color": "333333",
        "profile_use_background_image": true,
        "protected": false,
        "screen_name": "Mucahit_Dkmk",
        "statuses_count": 167,
        "time_zone": null,
        "translator_type": "none",
        "url": null,
        "utc_offset": null,
        "verified": false
    }
}{
    "contributors": null,
    "coordinates": null,
    "created_at": "Thu Feb 01 14:02:29 +0000 2018",
    "entities": {
        "hashtags": [
            {
                "indices": [
                    73,
                    87
                ],
                "text": "البلطجي_جبران"
            }
        ],
        "symbols": [],
        "urls": [],
        "user_mentions": [
            {
                "id": 15621444,
                "id_str": "15621444",
                "indices": [
                    3,
                    15
                ],
                "name": "Jerry Maher",
                "screen_name": "jerrymahers"
            }
        ]
    },
    "favorite_count": 0,
    "favorited": false,
    "geo": null,
    "id": 959064414073901056,
    "id_str": "959064414073901056",
    "in_reply_to_screen_name": null,
    "in_reply_to_status_id": null,
    "in_reply_to_status_id_str": null,
    "in_reply_to_user_id": null,
    "in_reply_to_user_id_str": null,
    "is_quote_status": false,
    "lang": "ar",
    "metadata": {
        "iso_language_code": "ar",
        "result_type": "recent"
    },
    "place": null,
    "retweet_count": 112,
    "retweeted": false,
    "retweeted_status": {
        "contributors": null,
        "coordinates": null,
        "created_at": "Thu Feb 01 07:37:12 +0000 2018",
        "entities": {
            "hashtags": [
                {
                    "indices": [
                        56,
                        70
                    ],
                    "text": "البلطجي_جبران"
                }
            ],
            "symbols": [],
            "urls": [
                {
                    "display_url": "twitter.com/i/web/status/9…",
                    "expanded_url": "https://twitter.com/i/web/status/958967454281207808",
                    "indices": [
                        117,
                        140
                    ],
                    "url": ""
                }
            ],
            "user_mentions": []
        },
        "favorite_count": 118,
        "favorited": false,
        "geo": null,
        "id": 958967454281207808,
        "id_str": "958967454281207808",
        "in_reply_to_screen_name": null,
        "in_reply_to_status_id": null,
        "in_reply_to_status_id_str": null,
        "in_reply_to_user_id": null,
        "in_reply_to_user_id_str": null,
        "is_quote_status": false,
        "lang": "ar",
        "metadata": {
            "iso_language_code": "ar",
            "result_type": "recent"
        },
        "place": {
            "attributes": {},
            "bounding_box": {
                "coordinates": [
                    [
                        [
                            12.453064,
                            55.613717
                        ],
                        [
                            12.6522012,
                            55.613717
                        ],
                        [
                            12.6522012,
                            55.731834
                        ],
                        [
                            12.453064,
                            55.731834
                        ]
                    ]
                ],
                "type": "Polygon"
            },
            "contained_within": [],
            "country": "Denmark",
            "country_code": "DK",
            "full_name": "Copenhagen, Denmark",
            "id": "936b83f20956cd4c",
            "name": "Copenhagen",
            "place_type": "city",
            "url": "https://api.twitter.com/1.1/geo/id/936b83f20956cd4c.json"
        },
        "retweet_count": 112,
        "retweeted": false,
        "source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
        "text": "ما لم يتم تسريبه من كلام وزير خارجية التيار الوطني الحر #البلطجي_جبران هو تطاوله على الرئيس الشهيد رفيق الحريري وعه…",
        "truncated": true,
        "user": {
            "contributors_enabled": false,
            "created_at": "Sun Jul 27 16:49:04 +0000 2008",
            "default_profile": false,
            "default_profile_image": false,
            "description": "Daniel known as Jerry, CEO @SawtBeirut , a Journalist based in Europe & a father of 1 under 10!  #جيري_ماهر",
            "entities": {
                "description": {
                    "urls": [
                        {
                            "display_url": "Fb.com/sawtbeirut",
                            "expanded_url": "http://Fb.com/sawtbeirut",
                            "indices": [
                                98,
                                121
                            ],
                            "url": ""
                        }
                    ]
                },
                "url": {
                    "urls": [
                        {
                            "display_url": "sbeirut.com",
                            "expanded_url": "http://sbeirut.com",
                            "indices": [
                                0,
                                23
                            ],
                            "url": ""
                        }
                    ]
                }
            },
            "favourites_count": 4014,
            "follow_request_sent": false,
            "followers_count": 241866,
            "following": false,
            "friends_count": 39,
            "geo_enabled": true,
            "has_extended_profile": true,
            "id": 15621444,
            "id_str": "15621444",
            "is_translation_enabled": true,
            "is_translator": false,
            "lang": "en",
            "listed_count": 1011,
            "location": "Sweden | مملكة السويد",
            "name": "Jerry Maher",
            "notifications": false,
            "profile_background_color": "DADDC0",
            "profile_background_image_url": "http://pbs.twimg.com/profile_background_images/591745396025602048/8WfYJY91.jpg",
            "profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/591745396025602048/8WfYJY91.jpg",
            "profile_background_tile": false,
            "profile_banner_url": "https://pbs.twimg.com/profile_banners/15621444/1478685711",
            "profile_image_url": "http://pbs.twimg.com/profile_images/938835270593421314/hWzZM4NV_normal.jpg",
            "profile_image_url_https": "https://pbs.twimg.com/profile_images/938835270593421314/hWzZM4NV_normal.jpg",
            "profile_link_color": "646D7E",
            "profile_sidebar_border_color": "E2EAEF",
            "profile_sidebar_fill_color": "E2EAEF",
            "profile_text_color": "6C961C",
            "profile_use_background_image": true,
            "protected": false,
            "screen_name": "jerrymahers",
            "statuses_count": 7101,
            "time_zone": "Santiago",
            "translator_type": "none",
            "url": "",
            "utc_offset": -10800,
            "verified": true
        }
    },
    "source": "<a href=\"http://twitter.com/download/android\" rel=\"nofollow\">Twitter for Android</a>",
    "text": "RT @jerrymahers: ما لم يتم تسريبه من كلام وزير خارجية التيار الوطني الحر #البلطجي_جبران هو تطاوله على الرئيس الشهيد رفيق الحريري وعهده السي…",
    "truncated": false,
    "user": {
        "contributors_enabled": false,
        "created_at": "Thu Jan 23 18:10:34 +0000 2014",
        "default_profile": true,
        "default_profile_image": false,
        "description": "‏كلمتان خفيفتان على اللسان\n ثقيلتان في الميزان حبيبتان للرحمن\n\nسُبحَانَﷲ͜وَبحَمدِه     سُبحِاْنﷲ͜ﭑلْعظِيم",
        "entities": {
            "description": {
                "urls": []
            }
        },
        "favourites_count": 227,
        "follow_request_sent": false,
        "followers_count": 666,
        "following": false,
        "friends_count": 96,
        "geo_enabled": false,
        "has_extended_profile": false,
        "id": 2299720641,
        "id_str": "2299720641",
        "is_translation_enabled": false,
        "is_translator": false,
        "lang": "ar",
        "listed_count": 6,
        "location": "",
        "name": "عاصفة الحزم . AM",
        "notifications": false,
        "profile_background_color": "C0DEED",
        "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
        "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
        "profile_background_tile": false,
        "profile_banner_url": "https://pbs.twimg.com/profile_banners/2299720641/1445001218",
        "profile_image_url": "http://pbs.twimg.com/profile_images/909051784861306880/hlVPyEeq_normal.jpg",
        "profile_image_url_https": "https://pbs.twimg.com/profile_images/909051784861306880/hlVPyEeq_normal.jpg",
        "profile_link_color": "1DA1F2",
        "profile_sidebar_border_color": "C0DEED",
        "profile_sidebar_fill_color": "DDEEF6",
        "profile_text_color": "333333",
        "profile_use_background_image": true,
        "protected": false,
        "screen_name": "thowaibi",
        "statuses_count": 54627,
        "time_zone": null,
        "translator_type": "none",
        "url": null,
        "utc_offset": null,
        "verified": false
    }
}
{
“贡献者”:空,
“坐标”:空,
“创建时间”:“2018年2月1日星期四14:02:44+0000”,
“实体”:{
“hashtags”:[
{
“指数”:[
100,
114
],
“文本”:“文本”
},
{
“指数”:[
115,
132
],
“文本”:“文本”
}
],
“符号”:[],
“URL”:[],
“用户_提及”:[]
},
“收藏夹计数”:0,
“偏爱”:错误,
“geo”:空,
“id”:959064478078955520,
“id_街”:“959064478078955520”,
“回复至屏幕名称”为空,
“在对状态id的回复中”:null,
“在对状态的回复中”id“str”:空,
“in_reply_to_user_id”:null,
“在对用户id的回复中”:null,
“is_quote_status”:false,
“郎”:“ar”,
“元数据”:{
“iso语言代码”:“ar”,
“结果类型”:“最近”
},
“地点”:空,
“转发计数”:0,
“转发”:错误,
“来源”:“,
“文本”文本:门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门门在各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各(二)(二)(三)(三)(三)(三))(三)(三)(四))(三)((三,
“截断”:false,
“用户”:{
“已启用贡献者”:false,
“创建时间”:“Wed Sep 28 16:22:51+0000 2016”,
“默认_配置文件”:true,
“默认_配置文件_图像”:false,
“描述”描述描述:“1591月月15日日,本月15 15 15日日日,本月15日日日,本月15日日日,本月15日日日,本月月15日日日日日日日,本月15 15日日日日日,本月15 15日日日日日,本月15 15 15日日日日日,本本月15 15日日日日日,本本月15 15日日日日日日,本本本本本本本月月16日日日日日日日日,本本本本本本本本本本本本本本本本本月月16日日日日日,从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从从在5月15日的各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各各(四)(五)(五)(五)(五)(五))(五,
“实体”:{
“说明”:{
“URL”:[]
}
},
“最受欢迎项”统计:99,
“跟踪请求发送”:false,
“粉丝数”:32,
"跟随":假,,
“朋友数”:94,
“已启用地理位置”:false,
“是否扩展了个人资料”:正确,
“id”:781167295645245440,
“id_街”:“781167295645245440”,
“是否已启用翻译”:false,
“is_translator”:错误,
“郎”:“恩”,
“列出的计数”:0,
“地点”:“黎巴嫩”,
“名称”:“圣战者Dkmak”,
“通知”:错误,
“配置文件\背景\颜色”:“F5F8FA”,
“profile\u background\u image\u url”:空,
“profile\u background\u image\u url\u https”:空,
“配置文件\u背景\u平铺”:false,
“配置文件\u横幅\u url”:https://pbs.twimg.com/profile_banners/781167295645245440/1517268329",
“配置文件\图像\ url”:http://pbs.twimg.com/profile_images/958118925824352256/_oZgUrap_normal.jpg",
“配置文件\u图像\u url\u https”:https://pbs.twimg.com/profile_images/958118925824352256/_oZgUrap_normal.jpg",
“配置文件链接颜色”:“1DA1F2”,
“配置文件\侧边栏\边框\颜色”:“C0”,
“配置文件\侧边栏\填充\颜色”:“DDEEF6”,
“配置文件\文本\颜色”:“333333”,
“profile\u use\u background\u image”:真,
“受保护”:错误,
“屏幕名称”:“Mucahit_Dkmk”,
“状态计数”:167,
“时区”:空,
“翻译器类型”:“无”,
“url”:空,
“utc_偏移量”:空,
“已验证”:错误
}
}{
“贡献者”:空,
“坐标”:空,
“创建时间”:“2018年2月1日星期四14:02:29+0000”,
“实体”:{
“hashtags”:[
{
“指数”:[
73,
87
],
“文本”:“文本”
}
],
“符号”:[],
“URL”:[],
“用户_提到”:[
{
“id”:15621444,
“id_str”:“15621444”,
“指数”:[
3.
15
],
“姓名”:“杰瑞·马赫尔”,
“屏幕名称”:“jerrymahers”
}
]
},
“收藏夹计数”:0,
“偏爱”:错误,
“geo”:空,
“id”:959064414073901056,
“id_街”:“959064414073901056”,
“回复至屏幕名称”为空,
“在对状态id的回复中”:null,
“在对状态的回复中”id“str”:空,
“in_reply_to_user_id”:null,
“在对用户id的回复中”:null,
“is_quote_status”:false,
“郎”:“ar”,
“元数据”:{
“iso语言代码”:“ar”,
“结果类型”:“最近”
},
“地点”:空,
“转发计数”:112,
“转发”:错误,
“转发状态”:{
“贡献者”:空,
“坐标”:空,
“创建时间”:“2018年2月1日星期四07:37:12+0000”,
“实体”:{
“hashtags”:[
{
“指数”:[
56,
70
],
“文本”:“文本”
}
],
“符号”:[],
“URL”:[
{
“显示url”:“twitter.com/i/web/status/9…”,
“扩展url”:https://twitter.com/i/web/status/958967454281207808",
“指数”:[
117,
140
],
“url”:”
}
],
“用户_提及”:[]
},
“最喜欢的”计数:118,
“偏爱”:错误,
“geo”:空,
“id”:958967454281207808,
“id_街”:“958967454281207808”,
“回复至屏幕名称”为空,
“在对状态id的回复中”:null,
“在对状态的回复中”id“str”:空,
“在给我们的答复中
}{