-Added dotnet build

-Removed WinRT files
-Updated solution files to VS2015
-Updated psake
This commit is contained in:
James Newton-King
2015-08-02 23:56:26 +12:00
parent 7bad8a73c4
commit fe7b7a6c7b
102 changed files with 507 additions and 1247 deletions
@@ -44,32 +44,41 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Serializer
[Test]
public void Example()
{
#region Usage
// settings will automatically be used by JsonConvert.SerializeObject/DeserializeObject
JsonConvert.DefaultSettings = () => new JsonSerializerSettings
{
Formatting = Formatting.Indented,
ContractResolver = new CamelCasePropertyNamesContractResolver()
};
string json;
Staff s = new Staff
try
{
FirstName = "Eric",
LastName = "Example",
BirthDate = new DateTime(1980, 4, 20, 0, 0, 0, DateTimeKind.Utc),
Department = "IT",
JobTitle = "Web Dude"
};
#region Usage
// settings will automatically be used by JsonConvert.SerializeObject/DeserializeObject
JsonConvert.DefaultSettings = () => new JsonSerializerSettings
{
Formatting = Formatting.Indented,
ContractResolver = new CamelCasePropertyNamesContractResolver()
};
string json = JsonConvert.SerializeObject(s);
// {
// "firstName": "Eric",
// "lastName": "Example",
// "birthDate": "1980-04-20T00:00:00Z",
// "department": "IT",
// "jobTitle": "Web Dude"
// }
#endregion
Staff s = new Staff
{
FirstName = "Eric",
LastName = "Example",
BirthDate = new DateTime(1980, 4, 20, 0, 0, 0, DateTimeKind.Utc),
Department = "IT",
JobTitle = "Web Dude"
};
json = JsonConvert.SerializeObject(s);
// {
// "firstName": "Eric",
// "lastName": "Example",
// "birthDate": "1980-04-20T00:00:00Z",
// "department": "IT",
// "jobTitle": "Web Dude"
// }
#endregion
}
finally
{
JsonConvert.DefaultSettings = null;
}
StringAssert.AreEqual(@"{
""firstName"": ""Eric"",