我的JSON数据有什么问题
我已经尝试过以JSON的形式打开这个文件,因为这是它应该是的,因为它有一些问题。我在网上用json验证程序检查了它,根据网站的说法,第70行附近有一个错误。我不是json方面的专家,所以我不明白它有什么问题。我复制了其中的一小部分,你可以在下面找到我的JSON数据有什么问题,json,validation,format,Json,Validation,Format,我已经尝试过以JSON的形式打开这个文件,因为这是它应该是的,因为它有一些问题。我在网上用json验证程序检查了它,根据网站的说法,第70行附近有一个错误。我不是json方面的专家,所以我不明白它有什么问题。我复制了其中的一小部分,你可以在下面找到 { "status": 200, "result": [{ "postcode": "CF62 4QT", "quality": 1, "eastings": 302219, "northings": 1663
{
"status": 200,
"result": [{
"postcode": "CF62 4QT",
"quality": 1,
"eastings": 302219,
"northings": 166319,
"country": "Wales",
"nhs_ha": "Cardiff and Vale University Health Board",
"longitude": -3.40660995190364,
"latitude": 51.3874671892387,
"european_electoral_region": "Wales",
"primary_care_trust": "Cardiff and Vale University Health Board",
"region": null,
"lsoa": "The Vale of Glamorgan 014E",
"msoa": "The Vale of Glamorgan 014",
"incode": "4QT",
"outcode": "CF62",
"distance": 0.19425416,
"parliamentary_constituency": "Vale of Glamorgan",
"admin_district": "Vale of Glamorgan",
"parish": "St. Athan",
"admin_county": null,
"admin_ward": "St. Athan",
"ccg": "Cardiff and Vale University Health Board",
"nuts": "Cardiff and Vale of Glamorgan",
"codes": {
"admin_district": "W06000014",
"admin_county": "W99999999",
"admin_ward": "W05000649",
"parish": "W04000668",
"parliamentary_constituency": "W07000078",
"ccg": "W11000029",
"nuts": "UKL22"
}
}, {
"postcode": "CF62 4ZW",
"quality": 1,
"eastings": 302219,
"northings": 166319,
"country": "Wales",
"nhs_ha": "Cardiff and Vale University Health Board",
"longitude": -3.40660995190364,
"latitude": 51.3874671892387,
"european_electoral_region": "Wales",
"primary_care_trust": "Cardiff and Vale University Health Board",
"region": null,
"lsoa": "The Vale of Glamorgan 014E",
"msoa": "The Vale of Glamorgan 014",
"incode": "4ZW",
"outcode": "CF62",
"distance": 0.19425416,
"parliamentary_constituency": "Vale of Glamorgan",
"admin_district": "Vale of Glamorgan",
"parish": "St. Athan",
"admin_county": null,
"admin_ward": "St. Athan",
"ccg": "Cardiff and Vale University Health Board",
"nuts": "Cardiff and Vale of Glamorgan",
"codes": {
"admin_district": "W06000014",
"admin_county": "W99999999",
"admin_ward": "W05000649",
"parish": "W04000668",
"parliamentary_constituency": "W07000078",
"ccg": "W11000029",
"nuts": "UKL22"
}
},{
"status": 200,
"result": [{
"postcode": "TN31 6QP",
"quality": 1,
"eastings": 583576,
"northings": 125972,
"country": "England",
"nhs_ha": "South East Coast",
"longitude": 0.615129131439058,
"latitude": 51.0038432751221,
"european_electoral_region": "South East",
"primary_care_trust": "Hastings and Rother",
"region": "South East",
"lsoa": "Rother 002B",
"msoa": "Rother 002",
"incode": "6QP",
"outcode": "TN31",
"distance": 2.29609038,
"parliamentary_constituency": "Bexhill and Battle",
"admin_district": "Rother",
"parish": "Northiam",
"admin_county": "East Sussex",
"admin_ward": "Rother Levels",
"ccg": "NHS Hastings and Rother",
"nuts": "East Sussex CC",
"codes": {
"admin_district": "E07000064",
"admin_county": "E10000011",
"admin_ward": "E05003977",
"parish": "E04003815",
"parliamentary_constituency": "E14000557",
"ccg": "E38000076",
"nuts": "UKJ22"
}
谢谢您的帮助。没什么,您最后没有关闭数组和对象 这是有效数据(已更正)
没什么,你最后没有关闭数组和对象 这是有效数据(已更正)
结果
数组未以]
终止
另外,返回两个对象,而不指定这将是一个数组
以下是固定的JSON:
[
{
"status": 200,
"result": [
{
"codes": {
"nuts": "UKL22",
"ccg": "W11000029",
"parliamentary_constituency": "W07000078",
"parish": "W04000668",
"admin_ward": "W05000649",
"admin_county": "W99999999",
"admin_district": "W06000014"
},
"nuts": "Cardiff and Vale of Glamorgan",
"ccg": "Cardiff and Vale University Health Board",
"admin_ward": "St. Athan",
"admin_county": null,
"parish": "St. Athan",
"admin_district": "Vale of Glamorgan",
"parliamentary_constituency": "Vale of Glamorgan",
"latitude": 51.3874671892387,
"longitude": -3.40660995190364,
"nhs_ha": "Cardiff and Vale University Health Board",
"country": "Wales",
"northings": 166319,
"eastings": 302219,
"quality": 1,
"postcode": "CF62 4QT",
"european_electoral_region": "Wales",
"primary_care_trust": "Cardiff and Vale University Health Board",
"region": null,
"lsoa": "The Vale of Glamorgan 014E",
"msoa": "The Vale of Glamorgan 014",
"incode": "4QT",
"outcode": "CF62",
"distance": 0.19425416
},
{
"codes": {
"nuts": "UKL22",
"ccg": "W11000029",
"parliamentary_constituency": "W07000078",
"parish": "W04000668",
"admin_ward": "W05000649",
"admin_county": "W99999999",
"admin_district": "W06000014"
},
"nuts": "Cardiff and Vale of Glamorgan",
"ccg": "Cardiff and Vale University Health Board",
"admin_ward": "St. Athan",
"admin_county": null,
"parish": "St. Athan",
"admin_district": "Vale of Glamorgan",
"parliamentary_constituency": "Vale of Glamorgan",
"latitude": 51.3874671892387,
"longitude": -3.40660995190364,
"nhs_ha": "Cardiff and Vale University Health Board",
"country": "Wales",
"northings": 166319,
"eastings": 302219,
"quality": 1,
"postcode": "CF62 4ZW",
"european_electoral_region": "Wales",
"primary_care_trust": "Cardiff and Vale University Health Board",
"region": null,
"lsoa": "The Vale of Glamorgan 014E",
"msoa": "The Vale of Glamorgan 014",
"incode": "4ZW",
"outcode": "CF62",
"distance": 0.19425416
}
]
},
{
"status": 200,
"result": [
{
"codes": {
"nuts": "UKJ22",
"ccg": "E38000076",
"parliamentary_constituency": "E14000557",
"parish": "E04003815",
"admin_ward": "E05003977",
"admin_county": "E10000011",
"admin_district": "E07000064"
},
"nuts": "East Sussex CC",
"ccg": "NHS Hastings and Rother",
"admin_ward": "Rother Levels",
"admin_county": "East Sussex",
"parish": "Northiam",
"admin_district": "Rother",
"parliamentary_constituency": "Bexhill and Battle",
"latitude": 51.0038432751221,
"longitude": 0.615129131439058,
"nhs_ha": "South East Coast",
"country": "England",
"northings": 125972,
"eastings": 583576,
"quality": 1,
"postcode": "TN31 6QP",
"european_electoral_region": "South East",
"primary_care_trust": "Hastings and Rother",
"region": "South East",
"lsoa": "Rother 002B",
"msoa": "Rother 002",
"incode": "6QP",
"outcode": "TN31",
"distance": 2.29609038
}
]
}
]
结果
数组未以]
终止
另外,返回两个对象,而不指定这将是一个数组
以下是固定的JSON:
[
{
"status": 200,
"result": [
{
"codes": {
"nuts": "UKL22",
"ccg": "W11000029",
"parliamentary_constituency": "W07000078",
"parish": "W04000668",
"admin_ward": "W05000649",
"admin_county": "W99999999",
"admin_district": "W06000014"
},
"nuts": "Cardiff and Vale of Glamorgan",
"ccg": "Cardiff and Vale University Health Board",
"admin_ward": "St. Athan",
"admin_county": null,
"parish": "St. Athan",
"admin_district": "Vale of Glamorgan",
"parliamentary_constituency": "Vale of Glamorgan",
"latitude": 51.3874671892387,
"longitude": -3.40660995190364,
"nhs_ha": "Cardiff and Vale University Health Board",
"country": "Wales",
"northings": 166319,
"eastings": 302219,
"quality": 1,
"postcode": "CF62 4QT",
"european_electoral_region": "Wales",
"primary_care_trust": "Cardiff and Vale University Health Board",
"region": null,
"lsoa": "The Vale of Glamorgan 014E",
"msoa": "The Vale of Glamorgan 014",
"incode": "4QT",
"outcode": "CF62",
"distance": 0.19425416
},
{
"codes": {
"nuts": "UKL22",
"ccg": "W11000029",
"parliamentary_constituency": "W07000078",
"parish": "W04000668",
"admin_ward": "W05000649",
"admin_county": "W99999999",
"admin_district": "W06000014"
},
"nuts": "Cardiff and Vale of Glamorgan",
"ccg": "Cardiff and Vale University Health Board",
"admin_ward": "St. Athan",
"admin_county": null,
"parish": "St. Athan",
"admin_district": "Vale of Glamorgan",
"parliamentary_constituency": "Vale of Glamorgan",
"latitude": 51.3874671892387,
"longitude": -3.40660995190364,
"nhs_ha": "Cardiff and Vale University Health Board",
"country": "Wales",
"northings": 166319,
"eastings": 302219,
"quality": 1,
"postcode": "CF62 4ZW",
"european_electoral_region": "Wales",
"primary_care_trust": "Cardiff and Vale University Health Board",
"region": null,
"lsoa": "The Vale of Glamorgan 014E",
"msoa": "The Vale of Glamorgan 014",
"incode": "4ZW",
"outcode": "CF62",
"distance": 0.19425416
}
]
},
{
"status": 200,
"result": [
{
"codes": {
"nuts": "UKJ22",
"ccg": "E38000076",
"parliamentary_constituency": "E14000557",
"parish": "E04003815",
"admin_ward": "E05003977",
"admin_county": "E10000011",
"admin_district": "E07000064"
},
"nuts": "East Sussex CC",
"ccg": "NHS Hastings and Rother",
"admin_ward": "Rother Levels",
"admin_county": "East Sussex",
"parish": "Northiam",
"admin_district": "Rother",
"parliamentary_constituency": "Bexhill and Battle",
"latitude": 51.0038432751221,
"longitude": 0.615129131439058,
"nhs_ha": "South East Coast",
"country": "England",
"northings": 125972,
"eastings": 583576,
"quality": 1,
"postcode": "TN31 6QP",
"european_electoral_region": "South East",
"primary_care_trust": "Hastings and Rother",
"region": "South East",
"lsoa": "Rother 002B",
"msoa": "Rother 002",
"incode": "6QP",
"outcode": "TN31",
"distance": 2.29609038
}
]
}
]
JSON中的
]
无法关闭结果
因此,请检查一下您的结构,我认为您可以修复它。结果
不会被JSON中的]
关闭
所以,检查一下你的结构,看看结果,我想你可以修复它。这是怎么产生的?如果你能在那里解决这个问题,那就最好了。我认为写列表的代码缺少结尾']'。这是如何产生的?如果你能在那里解决这个问题,那就最好了。我认为编写列表的代码缺少结尾']'。