Answers for "json property attributes c#"

C#
5

json property C#

public class Videogame
{
    [JsonProperty("name")]
    public string Name { get; set; }

    [JsonProperty("release_date")]
    public DateTime ReleaseDate { get; set; }
}
Posted by: Guest on November-13-2020
0

how to get properties from json in c#

var query = parsedStr.Descendants().OfType<JProperty>().Where(p => p.Value.Type != JTokenType.Array && p.Value.Type != JTokenType.Object);
        foreach (var property in query)
            Console.WriteLine(property);
Posted by: Guest on December-01-2020

Code answers related to "json property attributes c#"

C# Answers by Framework

Browse Popular Code Answers by Language