如何从以下JSON中提取viewers
到string[] people
这样的数组?
{
"_links": {},
"chatter_count": 7,
"chatters": {
"moderators": [
"moobot"
],
"staff": [],
"admins": [],
"global_mods": [],
"viewers": [
"dzoomal94",
"holeder",
"koza1258",
"kuba45209",
"ufolud321",
"varuulia"
]
}
}
答案 0 :(得分:0)
使用Json.Net你可以这样做:
JObject jo = JObject.Parse(json);
string[] people = jo.SelectToken("chatters.viewers").ToObject<string[]>();