using System.Collections.Generic;
public static void Main()
""Name"": ""LL Bottom Bracket"",
""ProductNumber"": ""BB-7421"",
""ProductCategoryID"": 9,
""ProductCategory"": ""Bottom Brackets"",
""Description"": ""Chromoly steel.""
""Name"": ""ML Bottom Bracket"",
""ProductNumber"": ""BB-8107"",
""ProductCategoryID"": 9,
""ProductCategory"": ""Bottom Brackets"",
""Description"": ""Aluminum alloy cups; large diameter spindle.""
var products = JsonConvert.DeserializeObject<Products>(jsonString);
Console.WriteLine(products.ProductsProducts.Count());
[JsonProperty("ProductID")]
public long ProductId { get; set; }
public string Name { get; set; }
[JsonProperty("ProductNumber")]
public string ProductNumber { get; set; }
[JsonProperty("ProductCategoryID")]
public long ProductCategoryId { get; set; }
[JsonProperty("ProductCategory")]
public string ProductCategory { get; set; }
[JsonProperty("ProductModelID")]
public long ProductModelId { get; set; }
[JsonProperty("Description")]
public string Description { get; set; }
[JsonProperty("Color", NullValueHandling = NullValueHandling.Ignore)]
public string Color { get; set; }
public partial class Products
[JsonProperty("Products")]
public IEnumerable<Product> ProductsProducts { get; set; }