作业帮 > 综合 > 作业

下面这段json数据求一段c#反序列化代码

来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/10 07:43:03
下面这段json数据求一段c#反序列化代码
{"ok":true,"reason":"","data":
{"buy":
[{"price":"1.28","mineral":457},
{"price":"1.27","mineral":18547},
{"price":"1.26","mineral":12572},
{"price":"1.25","mineral":21405},
{"price":"1.24","mineral":5430}],
"sell":
[{"price":"1.29","mineral":4262},
{"price":"1.30","mineral":5439},
{"price":"1.31","mineral":12753},
{"price":"1.32","mineral":7812},
{"price":"1.33","mineral":8646}],
"deal":
[{"deal_time":"16:59:26","price":"1.28","mineral":"49"},
{"deal_time":"16:59:26","price":"1.28","mineral":"1"},
{"deal_time":"16:59:26","price":"1.29","mineral":"463"},
{"deal_time":"16:58:40","price":"1.28","mineral":"7"},
{"deal_time":"16:58:40","price":"1.29","mineral":"2"}],
"config":{"id":"246","starttime":"1393203600","endtime":"1393232400","status":"0","configdate":"1393171200","now":1393151570}}}
下面这段json数据求一段c#反序列化代码
你去下载一个Newtonsoft.Json.dll,这是C#上性能较好的一个json序列化反序列化的类库了,然后反序列化的代码,可以参考:
http://blog.csdn.net/mazhaojuan/article/details/8592969