【发布时间】:2021-09-13 16:48:22
【问题描述】:
我需要使用 C# 中的 NewtonsoftJSON 从这个 JSON 响应中获取“id”数据:
{
"devices": [
{
"id": "0fa1a5aa7fdf4438a8082c993be1d9cd9bf0d32b",
"is_active": false,
"is_private_session": false,
"is_restricted": false,
"name": "DESKTOP-89E1DLU",
"type": "Computer",
"volume_percent": 26
},
{
"id": "404bdc9492d312f104359d72c3ee55dd7f624120",
"is_active": false,
"is_private_session": false,
"is_restricted": false,
"name": "Fluent Spotify",
"type": "Computer",
"volume_percent": 100
}
]
}
我需要始终从包含 “Fluent Spotify” 名称的数据块中获取 “id” 数据。
为此的 Spotify 文档游乐场是:https://developer.spotify.com/console/get-users-available-devices/
那么有人可以告诉我如何解析这个吗?我是 C# 新手。谢谢
【问题讨论】:
-
如果答案已经解决了您的问题,请mark 它被稍后访问此主题的方便人士所接受
标签: c# xaml uwp json.net spotify