The JSON serializer provides excellent support for serialization and deserialization of collection objects. -> Serializing To serialize a set --- a generic list, array, Dictionary, or custom set --- simply call the serializer and use the set object you want to serialize as the parameter, JSON. net will serialize the set and all the values it contains. Example: public class Product { public string Name { get; set; } public decimal Price { get; set; } [JsonConverter(typeof(IsoDateTimeConverter))] public DateTime ExpiryDate { get; set; } } Test: Product p1 = new Product() { Name = "Product 1", Price = 99.95m, ExpiryDate = new DateTime(2010, 12, 19, 0, 0, 0, DateTimeKind.Utc) }; Product p2 = new Product { Name = "Product 2", Price = 12.50m, ExpiryDate = new DateTime(2011, 1, 1, 0, 0, 0, DateTimeKind.Utc) }; List<Product> products = new List<Product>(); products.Add(p1); products.Add(p2); string json = JsonConvert.SerializeObject(products, Formatting.Indented); Console.WriteLine(json); Output result: [ { "Name": "Product 1 ", "Price": 99.95, "Expirydate": "2010-12-19t00: 00: 00Z" }, { "Name": "product 2 ", "Price": 12.50, "Expirydate": "2011-01-01t00: 00: 00Z" } ] -> Deserializing To deserialize JSON to A. Net set, you only need to specify a set type that you want to deserialize. JSON. Net supports multiple types of sets. Example: string json2 = @"[ { ""Name"": ""Product 1"", ""ExpiryDate"": ""2010-12-19T00:00:00Z"", ""Price"": 99.95, ""Sizes"": null }, { ""Name"": ""Product 2"", ""ExpiryDate"": ""2011-01-01T00:00:00Z"", ""Price"": 12.50, ""Sizes"": null } ]"; List<Product> productList = JsonConvert.DeserializeObject<List<Product>>(json2); Console.WriteLine(productList.Count);//2 Product product1 = productList[0]; Console.WriteLine(product1.Name);//Product 1 -> Deserializing dictionaries Using JSON. net, you can also deserialize a json object to a. Net generic dictionary. The property name and attribute value of the JSON object will be added to the dictionary. Example: string jsonDictionary = @"{""key1"":""value1"",""key2"":""value2""}"; Dictionary<string, string> dic = JsonConvert.DeserializeObject<Dictionary<string,string>>(jsonDictionary); Console.WriteLine(dic.Count);//2 Console.WriteLine(dic["key1"]);//value1 |