Answer the question
In order to leave comments, you need to log in
C#. How to get values from given JSON?
Good afternoon.
There is this JSON:
{
"joined": {
"@user1": {
"avatar_url": null,
"display_name": "user1"
},
"@user2": {
"avatar_url": null,
"display_name": "user2"
}
}
}
public partial class RoomUser
{
public Dictionary<string, Joined> Joined { get; set; }
}
public partial class Joined
{
public string AvatarUrl { get; set; }
public string DisplayName { get; set; }
}
var room = JsonConvert.DeserializeObject<RoomUser>(fb.DownloadString(uri));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question