т.е.
JSON
Код: Выделить всё
{
"id: "1234",
"name": "John Doe",
"username:":"jdoe",
"data": {
"avatarURL": "https://my.avatar.com/path",
"avatarThumnailURL": "https://my.avatar.com/path?thumb=1",
}
}
Код: Выделить всё
public class User
{
public string Id { get; set; }
public string Username { get; set; }
public string Name { get; set; }
public string? AvatarUrl { get; set; }
public string? AvatarThumbnailUrl { get; set; }
}
https://learn.microsoft.com/en-us/ dotnet/api/system.text.json.serialization.jsonpropertynameattribute?view=net-8.0
Подробнее здесь: https://stackoverflow.com/questions/790 ... p-when-des
Мобильная версия