1

我在firebase中有user_table,我想从user_table中获取所有节点数据作为列表。

我可以获取所有数据

FirebaseResponse response = await client.GetTaskAsync("User_Table\");

,那么我不能将json数据序列化为对象

 FirebaseResponse response = await client.GetTaskAsync("User_Table\\");
 List<UserList> usr = (List<UserList>)JsonConvert.DeserializeObject(response.ToString(), (typeof(List<UserList>)));
4

1 回答 1

1

您是否尝试过使用dictionaryand foreach

您也可以尝试从 YouTube https://m.youtube.com/watch?v=oeblTSuBjSo&t=1s 学习本教程

例子:

FirebaseResponse response = await client.GetAsync("users");
Dictionary<string, Class> data = response.ResultAs<Dictionary<string, Data>>();
return data;
于 2020-02-28T17:07:58.370 回答