【问题标题】:Cleaning/parsing JSON with python使用 python 清理/解析 JSON
【发布时间】:2016-07-17 02:07:23
【问题描述】:

谁能帮忙清理下面的 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

【问题讨论】:

标签: python json parsing


【解决方案1】:

这不是有效的 JSON - 用大括号括住整个内容 {}

为了将来参考,有许多在线 JSON 验证器/查看器可以快速告诉您是否使用有效的 JSON。

仅举几例:

【讨论】:

    猜你喜欢
    • 2014-12-17
    • 1970-01-01
    • 1970-01-01
    • 2018-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-24
    • 2019-08-11
    相关资源
    最近更新 更多