-Code reformat

This commit is contained in:
James Newton-King
2013-10-20 15:08:39 +13:00
parent d03963016e
commit bcd6982419
466 changed files with 71645 additions and 71598 deletions
@@ -5,26 +5,26 @@ using System.Text;
namespace Newtonsoft.Json.Tests.Documentation.Samples.Serializer
{
public class SerializeDateFormatHandling
{
public void Example()
public class SerializeDateFormatHandling
{
#region Usage
DateTime mayanEndOfTheWorld = new DateTime(2012, 12, 21);
string jsonIsoDate = JsonConvert.SerializeObject(mayanEndOfTheWorld);
Console.WriteLine(jsonIsoDate);
// "2012-12-21T00:00:00"
string jsonMsDate = JsonConvert.SerializeObject(mayanEndOfTheWorld, new JsonSerializerSettings
public void Example()
{
DateFormatHandling = DateFormatHandling.MicrosoftDateFormat
});
#region Usage
DateTime mayanEndOfTheWorld = new DateTime(2012, 12, 21);
Console.WriteLine(jsonMsDate);
// "\/Date(1356044400000+0100)\/"
#endregion
string jsonIsoDate = JsonConvert.SerializeObject(mayanEndOfTheWorld);
Console.WriteLine(jsonIsoDate);
// "2012-12-21T00:00:00"
string jsonMsDate = JsonConvert.SerializeObject(mayanEndOfTheWorld, new JsonSerializerSettings
{
DateFormatHandling = DateFormatHandling.MicrosoftDateFormat
});
Console.WriteLine(jsonMsDate);
// "\/Date(1356044400000+0100)\/"
#endregion
}
}
}
}