using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Collections.ObjectModel;
using System.Globalization;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
public int ID { get; set; }
public string Name { get; set; }
public static void Test()
var products= new List<Product>()
new Product() {ID=1,Name="AA" },
new Product() {ID=2,Name="BB" }
var JSON = JObject.Parse(JSONstr);
JSON["Products"] = JToken.FromObject(products);
JSON["TimeStamp"] = JToken.FromObject(DateTime.UtcNow);
public static void Main()
Console.WriteLine("Environment version: " + Environment.Version);
Console.WriteLine("Json.NET version: " + typeof(JsonSerializer).Assembly.FullName);