我有以下 json,我正在尝试解析它。
>>> string1
u'{"content":{"search_highlight":{},"message_exchanged":{"messagesOnlyToViewee":true,"messagesOnlyToViewer":true},"Certifications":{"certsMpr":{},"empty":{}},"lix_treasury_callout":"B","network_overview":{"img_overview_locked":"http://s.c.lnkd.licdn.com/scds/common/u/img/pic/pic_network_overview_locked_178x276.png","lix_showDetail":"control"},"Projects":{"empty":{},"projectsMpr":{}},"lix_discovery_order":"control","Volunteering":{"volunteer":{},"empty":{}},"lix_treasury_upload":"B","connections":{},"view_tracking":{},"Badge":{"badges":{},"empty":{}},"Patents":{"patentsMpr":{},"empty":{}},"Publications":{"empty":{},"pubsMpr":{}},"Summary":{"summary":{"deferImg":true,"hasSummaryOrSpecialties":false,"visible":true,"showSummarySection":false,"associatedWith":{}},"empty":{}},"Notes":{},"frontierajaxform__text_plain__there_were":"There were one or more errors in your submission. Please correct the marked fields below.","ContactInfo":{"distance":{"distance":\\u002d1,"numberOfConnections":2},"contact_info":{"deferImg":true,"showTwitter":true,"visible":true}},"Following":{"follow_channels":{},"follow_school":{},"follow_people":{"count":0,"viewee":{"id":29841231},"influencerSeeMore":\\u002d7,"influencers":[]},"follow":{"i18n_following_section_label":"Following","i18n_currently_following":"Following","isCondensed":true,"companyFolloweeCount":1,"industryFolloweeCount":1,"i18n_unfollow":"Unfollow","industryFollowees":[{"link_industry":"/today/insurance?trk=prof\\u002dfollowing\\u002dindustry\\u002dicon","universalName":"insurance","id":42,"i18n_x_followers":"93,628 followers","ind_follow":"/lite/follow?type=INDUSTRY&id=42&csrfToken=ajax%3A1584468784299534813&goback=%2Enpv_29841231_*1_*1_NAME*4SEARCH_AcEA_*1_en*4US_*1_*1_*1_123452511375704563981_2_7_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1","canonicalName":"Insurance","fmt_following_count":"93,628","ind_unfollow":"/lite/unfollow?type=INDUSTRY&id=42&csrfToken=ajax%3A1584468784299534813&goback=%2Enpv_29841231_*1_*1_NAME*4SEARCH_AcEA_*1_en*4US_*1_*1_*1_123452511375704563981_2_7_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1","isShared":false}],"i18n_follow":"Follow","i18n_see_less":"See less","companyFollowees":[{"link_biz":"/company/metlife?trk=prof\\u002dfollowing\\u002dcompany\\u002dlogo","universalName":"metlife","id":2213,"logo":"http://m.c.lnkd.licdn.com/media/p/2/000/021/14e/05da35a.png","canonicalName":"MetLife","biz_follow":"/company/follow/submit?id=2213&csrfToken=ajax%3A1584468784299534813&goback=%2Enpv_29841231_*1_*1_NAME*4SEARCH_AcEA_*1_en*4US_*1_*1_*1_123452511375704563981_2_7_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1_*1","ind_lookup":"Insurance","isShared":false,"logoId":"/p/2/000/021/14e/05da35a.png"}],"i18n_news":"News","isFollowing":true,"lix_profile_showChannels":"control"}},"BasicInfo":{"empty":{},"upsell":{"deferImg":true,"visible":true},"basic_info":{"showTopCardDetail":true,"visible":true,"phoneticname":"","i18n__Industry":"Industry","industry_pivot":"/search?search=&industry=42&sortCriteria=R&keepFacets=true&trk=prof\\u002d0\\u002dovw\\u002dindustry","find_others_region":"Find other members in Mumbai Area, India","headline_highlight":"Manager at Metlife","i18n__find_others_in_industry":"Find other members in this industry","i18n_Edit":"Edit"}}}}'
但是当我说这不会加载
>>> import re
>>> import json
>>> nw = json.loads(string1)
Traceback (most recent call last):
File "<pyshell#33>", line 1, in <module>
nw = json.loads(string1)
File "C:\Python27\lib\json\__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "C:\Python27\lib\json\decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python27\lib\json\decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
谢谢