-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,36 +5,36 @@ using System.Text;
namespace Newtonsoft.Json.Tests.Documentation.Samples.Serializer
{
public class JsonPropertyName
{
#region Types
public class Videogame
public class JsonPropertyName
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("release_date")]
public DateTime ReleaseDate { get; set; }
}
#endregion
public void Example()
{
#region Usage
Videogame starcraft = new Videogame
#region Types
public class Videogame
{
Name = "Starcraft",
ReleaseDate = new DateTime(1998, 1, 1)
};
[JsonProperty("name")]
public string Name { get; set; }
string json = JsonConvert.SerializeObject(starcraft, Formatting.Indented);
[JsonProperty("release_date")]
public DateTime ReleaseDate { get; set; }
}
#endregion
Console.WriteLine(json);
// {
// "name": "Starcraft",
// "release_date": "1998-01-01T00:00:00"
// }
#endregion
public void Example()
{
#region Usage
Videogame starcraft = new Videogame
{
Name = "Starcraft",
ReleaseDate = new DateTime(1998, 1, 1)
};
string json = JsonConvert.SerializeObject(starcraft, Formatting.Indented);
Console.WriteLine(json);
// {
// "name": "Starcraft",
// "release_date": "1998-01-01T00:00:00"
// }
#endregion
}
}
}
}
}