我有一个包含数组的 JSON 字符串,它无法被反序列化。我想拆分,以便每次尝试崩溃时都可以访问产品列表及其代码和数量。Json 字符串返回如下:
{
"transaction_id": "88",
"store_id": "3",
"cashier_id": null,
"loyalty_account": null,
"transaction_time": "1382027452",
"total_amount": "99.45",
"items": {
"1239219274": "1",
"3929384913": "1"
},
"payments": {
"cc": "99.45"
}
}
我希望它分为:
{
"transaction_id": "88",
"store_id": "3",
"cashier_id": null,
"loyalty_account": null,
"transaction_time": "1382027452",
"total_amount": "99.45"
}
和
{
"1239219274":"1",
"3929384913":"1"
}
和
{
"cc": "99.45"
}