用python清理/解析JSON
有人能帮忙清理一下吗用python清理/解析JSON,python,json,parsing,Python,Json,Parsing,有人能帮忙清理一下吗 "1-Transaction Transfer Info Segment-F2":{ "Selling Store Number":"01818", "Transaction Date":"2014-09-08", "Transaction Time":"05:45:49", "Transaction Service Type":"I", "IP Time Id":"118180546186" } 我想清理这个json,如下所示
"1-Transaction Transfer Info Segment-F2":{
"Selling Store Number":"01818",
"Transaction Date":"2014-09-08",
"Transaction Time":"05:45:49",
"Transaction Service Type":"I",
"IP Time Id":"118180546186"
}
我想清理这个json,如下所示
1-Transaction Transfer Info Segment-F2 =>1_Transaction_Transfer_Info_Segment_F2
Selling Store Number => Selling_Store_Number,
Transaction Service Type => Transaction_Servic_Type,
IP Time Id => IP_Time_Id
这不是有效的JSON-用大括号{}将整个内容括起来 作为将来的参考,有许多在线JSON验证器/查看器可以快速告诉您是否正在使用有效的JSON 仅举几个例子: