Deserialize json object with dynamic items in C#
Your code structure is not reflecting your json. Common approach to deserializing json with dynamic property names is to use Dictionary<string, …> (supported both by Json.NET and System.Text.Json). Try the following: public class Bike { public int Value { get; set; } public string Type { get; set; } } public class Person { public … Read more