[报错信息1:JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1] 和 [报错信息2:AttributeError: 'str' object has no attribute 'read' ] 以及demjson安装使用
一、报错信息
如图:
代码如下:
dict_tmp = {
}
file = open("……\\abc.json","r",encoding = 'utf-8')
fr = json.load(file)
哪里出了问题我也实在不知道,这里再附上abc.json文件吧
{ {
“detail”: [
{
“periodical”: {
“Id”: “zhyxxxdb202018003”,
“Title”: [
“医学信息学发展现状与展望”
],
“Creator”: [
“钱庆”
],
“FirstCreator”: “钱庆”,
“ScholarIdAuthor”: [],
“ScholarId”: [],
“ForeignCreator”: [],
“CreatorForSearch”: [],
“OrganizationNorm”: [
“中国医学科学院医学信息研究所”
],
“OrganizationNew”: [
“中国医学科学院医学信息研究所”
],
“OriginalOrganization”: [
“中国医学科学院医学信息研究所”
],
“OrganizationForSearch”: [],
“OriginalClassCode”: [],
“MachinedClassCode”: [],
“ClassCodeForSearch”: [],
“PeriodicalClassCode”: [
“RT”
],
“ContentSearch”: [],
“Keywords”: [],
“ForeignKeywords”: [],
“MachinedK