Rtransat
Rtransat
CC#
Created by Rtransat on 7/16/2023 in #help
❔ Get only values when deserialize json
Why not IEnumerable<string>?
17 replies
CC#
Created by Rtransat on 7/16/2023 in #help
❔ Get only values when deserialize json
I would like to deserialize _Genres with a private visibility because the users of the lib doesn't need to use _Genres. It's possible?
17 replies
CC#
Created by Rtransat on 7/16/2023 in #help
❔ Get only values when deserialize json
Something like this?
[JsonPropertyName("genres")]
private Dictionary<string, string> _Genres { get; set; }

public List<string> Genres => _Genres.Values.ToList();
[JsonPropertyName("genres")]
private Dictionary<string, string> _Genres { get; set; }

public List<string> Genres => _Genres.Values.ToList();
17 replies
CC#
Created by Rtransat on 7/16/2023 in #help
❔ Get only values when deserialize json
Yes but I only need the values.
17 replies
CC#
Created by Rtransat on 7/16/2023 in #help
❔ Get only values when deserialize json
I'm building an api wrapper. So I just use
[JsonPropertyName("genres")]
public Dictionary<string, string> Genres { get; set; }
[JsonPropertyName("genres")]
public Dictionary<string, string> Genres { get; set; }
And I add some method to get a list?
17 replies