0
我想deserialise在C#中的JSON文件,以便每个订单量与所有可能的值一个单独的线。我没有反序列化JSON的问题,但是这个具有可变的属性名称。在示例中,文件下面有2个顺序:O1ZBIX-GGYTG-RJVXNK & ORJZUB-AL7JW-7BBWPZ。请咨询我如何做到这一点。Deserialise JSON变量名
{
"error": [],
"result": {
"open": {
"O1ZBIX-GGYTG-RJVXNK": {
"refid": null,
"userref": null,
"status": "open",
"opentm": 1486584202.2485,
"starttm": 0,
"expiretm": 0,
"descr": {
"pair": "XBTEUR",
"type": "sell",
"ordertype": "limit",
"price": "1019.000",
"price2": "0",
"leverage": "none",
"order": "sell 0.20809000 XBTEUR @ limit 1019.000"
},
"vol": "0.20809000",
"vol_exec": "0.00000000",
"cost": "0.00000",
"fee": "0.00000",
"price": "0.00000",
"misc": "",
"oflags": "fciq"
},
"ORJZUB-AL7JW-7BBWPZ": {
"refid": null,
"userref": null,
"status": "open",
"opentm": 1486468345.44,
"starttm": 0,
"expiretm": 0,
"descr": {
"pair": "LTCEUR",
"type": "sell",
"ordertype": "limit",
"price": "3.78000",
"price2": "0",
"leverage": "none",
"order": "sell 54.20054000 LTCEUR @ limit 3.78000"
},
"vol": "54.20054000",
"vol_exec": "0.00000000",
"cost": "0.00000",
"fee": "0.00000",
"price": "0.00000",
"misc": "",
"oflags": "fciq"
}
}
}
}
你能不能反序列化为了每一个关键的'词典<字符串的MyType>'? –
两个订单具有完全相同的数量,顺序和密钥的命名。 – rism
我不明白你的要求。 – CodingYoshi