如何比较两个json文件并在python中查找准确性

问题描述 投票:-2回答:1

输入:

json_file_1:

“位置”:[{“ text”:“”,“地址”:“印度海得拉巴,特兰加纳邦”,“ address_type”:“ PRESENT”,“ area”:“”,“ city”:“海得拉巴”,“ district”:“”,“ state”:“ telangana”,“ state_short”:“”,“ country”:“印度”,“ country_short”:“”,“邮政编码” : ””,“ latitude”:“”,“经度”:“”,“ city_canon”:“”,“ district_canon”:“”,“ state_canon”:“”,“ country_canon”:“”}],

json_file_2:

“位置”:[{“ text”:“”,“地址”:“印度海得拉巴,特兰加纳邦”,“ address_type”:“ PRESENT”,“ area”:“”,“ city”:“海得拉巴”,“ district”:“”,“ state”:“ telangana”,“ state_short”:“”,“ country”:“印度”,“ country_short”:“”,“邮政编码” : ””,“ latitude”:“”,“经度”:“”,“ city_canon”:“”,“ district_canon”:“”,“ state_canon”:“”,“ country_canon”:“”},{“ text”:“”,“ address”:“印度塞伦德拉巴德,塞兰达纳”,“ address_type”:“ PRESENT”,“ area”:“”,“ city”:“ secunderabad”,“ district”:“”,“ state”:“ telangana”,“ state_short”:“”,“ country”:“印度”,“ country_short”:“”,“邮政编码” : ””,“ latitude”:“”,“经度”:“”,“ city_canon”:“”,“ district_canon”:“”,“ state_canon”:“”,

python json
1个回答
0
投票
您可以为此使用jsondiff,这是文档link
© www.soinside.com 2019 - 2024. All rights reserved.