从JSON获取根节点值 [英] Get the root node value from JSON
本文介绍了从JSON获取根节点值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从一个看起来像这样的API获得了一些JSON:
{ABCDE1234:{name:ABC Company,status :活动}}
根节点是动态生成的,我想获取它的值并将所有JSON序列化为.NET对象。
有人能给我任何线索吗?
I am getting some JSON from an API that looks like this:
{"ABCDE1234":{"name":"ABC Company","status":"Active"}}
The root node is generated dynamically and I want to get its value and serialize all the JSON into a .NET object.
Can anyone give me any clues please?
推荐答案
http://stackoverflow.com/questions/3142495/deserialize-json-into-c-sharp-dynamic-object [< a href =http://stackoverflow.com/questions/3142495/deserialize-json-into-c-sharp-dynamic-objecttarget =_ blanktitle =New Window> ^ ]
如果您使用像json.net等库这些东西往往更容易。
http://stackoverflow.com/questions/3142495/deserialize-json-into-c-sharp-dynamic-object[^]
If you use a library like json.net etc these things tend to be easier.
这篇关于从JSON获取根节点值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文