我正在从无法控制的API中读取数据,它以以下格式返回数据:
{
"Members": {
"001": {
"prop1": "value1",
"prop2": "value2"
},
"002": {
"prop1": "value3",
"prop2": "value4"
},
...
}
}
它使用成员ID作为键而不是使用数组。我想在C#中(使用json.net)解析此文件,但不确定如何将其“转换”为数组。像
{
"Members": [
{
"id": "001",
"prop1": "value1",
"prop2": "value2"
},
{
"id": "002",
"prop1": "value3",
"prop2": "value4"
}
]
}