C#C
C#3y ago
16 replies
Rtransat

❔ Get only values when deserialize json

Hi, it's possible to deserialize something like this with only values?

"genres": {
    "Action": "Action",
    "Adventure": "Aventure",
    "Drama": "Drame",
    "Fantasy": "Fantastique"
},


I would like something like this instead of a Dictionary:
[JsonPropertyName("genres")]
public List<string> Genres { get; set; }
Was this page helpful?