-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,46 +5,46 @@ using System.Text;
namespace Newtonsoft.Json.Tests.Documentation.Samples.Serializer
{
public class SerializeObject
{
#region Types
public class Account
public class SerializeObject
{
public string Email { get; set; }
public bool Active { get; set; }
public DateTime CreatedDate { get; set; }
public IList<string> Roles { get; set; }
}
#endregion
public void Example()
{
#region Usage
Account account = new Account
#region Types
public class Account
{
Email = "james@example.com",
Active = true,
CreatedDate = new DateTime(2013, 1, 20, 0, 0, 0, DateTimeKind.Utc),
Roles = new List<string>
public string Email { get; set; }
public bool Active { get; set; }
public DateTime CreatedDate { get; set; }
public IList<string> Roles { get; set; }
}
#endregion
public void Example()
{
#region Usage
Account account = new Account
{
"User",
"Admin"
}
};
Email = "james@example.com",
Active = true,
CreatedDate = new DateTime(2013, 1, 20, 0, 0, 0, DateTimeKind.Utc),
Roles = new List<string>
{
"User",
"Admin"
}
};
string json = JsonConvert.SerializeObject(account, Formatting.Indented);
// {
// "Email": "james@example.com",
// "Active": true,
// "CreatedDate": "2013-01-20T00:00:00Z",
// "Roles": [
// "User",
// "Admin"
// ]
// }
string json = JsonConvert.SerializeObject(account, Formatting.Indented);
// {
// "Email": "james@example.com",
// "Active": true,
// "CreatedDate": "2013-01-20T00:00:00Z",
// "Roles": [
// "User",
// "Admin"
// ]
// }
Console.WriteLine(json);
#endregion
Console.WriteLine(json);
#endregion
}
}
}
}
}