问题描述
我正在使用微任务Web应用程序,其中,工作队正在为我标记数据点。他们拥有的问卷非常灵活,这意味着他们可以使用无限数量的属性标记数据点。 json模式中有一些默认值和必填字段,但是并非所有这些都是其中之一。最后有2个示例,用于2个不同数据点的输出。
我需要在python中有一个脚本,该脚本可以让我将结果解压缩为可摘要格式,以进行非数据分析,例如csv。 JSON模式使用是否适用于此处? 有什么建议或线索吗?
谢谢
1)
{
"source_relevance_section": {
"source_relevance": [
"Source report refers to the subject"
]
},"micro_event_section": {
"micro_event_list": [
{
"subject_section": {
"subject_list": [
{
"subject_type": "people (unspecified/other)","subject_number_txt": "at least one","subject_info": "Mad man drove into a shop"
}
]
},"location_object_info_section": {
"location_object_info": "Warsaw,"
},"actions_section": {
"action_section": {
"action_list": [
{
"action_type": "vehicle-impact [attack]"
}
]
},"building_object_section": {
"building_object_list": []
},"people_object_section": {
"people_object_list": [
{
"people_object_impact_list": [
{
"people_object_impact": "incident object [person]"
}
],"people_object_type": "people in shop","people_object_number_txt": "at least one","people_object_info": "one or more people got injured"
}
]
},"vehicles_section": {
"vehicles_list": []
},"property_object_section": {
"property_object_list": []
},"temporary_object_section": {
"temporary_object_list": []
}
}
}
]
}
}
2)
{
"source_relevance_section": {
"source_relevance": [
"Source report refers to the subject"
]
},"micro_event_section": {
"micro_event_list": [
{
"subject_section": {
"subject_list": [
{
"subject_type": "gunmen","subject_info": "Unspecified individuals"
}
]
},"location_object_info_section": {
"location_object_info": "Paris"
},"actions_section": {
"action_section": {
"action_list": [
{
"action_type": "firearm [attack,gunbattle]"
}
]
},"building_object_section": {},"people_object_section": {
"people_object_list": [
{
"people_object_impact_list": [
{
"people_object_impact": "injury [person]"
}
],"people_object_type": "people (unspecified/other)","people_object_number_int": 1,"people_object_info": "A man injured"
}
]
},"vehicles_section": {
"vehicles_list": [
{
"vehicle_object_section": {
"vehicle_object_list": [
{
"vehicle_object_impact_list": [
{
"vehicle_object_impact": "set on fire [vehicle]"
}
],"vehicle_object_type": "car","vehicle_object_number_int": 1,"vehicle_object_number_txt": "at least one","vehicle_object_info": "A second vehicle probably involved in the shooting was set on fire"
}
]
},"aircraft_object_section": {},"vessel_object_section": {}
}
]
},"temporary_object_section": {}
}
}
]
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)