Click or drag to resize
Json.NET

Using JToken.ToString with JsonConverter

 

This sample uses a JsonConverter to customize converting LINQ to JSON objects to JSON.

Sample
Usage
JObject o = JObject.Parse(@"{'string1':'value','integer2':99,'datetime3':'2000-05-23T00:00:00'}");

Console.WriteLine(o.ToString(Formatting.None, new JavaScriptDateTimeConverter()));
// {"string1":"value","integer2":99,"datetime3":new Date(959032800000)}