diff --git a/Build/Newtonsoft.Json.nuspec b/Build/Newtonsoft.Json.nuspec index 6ea6907a..0fe8ea58 100644 --- a/Build/Newtonsoft.Json.nuspec +++ b/Build/Newtonsoft.Json.nuspec @@ -2,7 +2,7 @@ Newtonsoft.Json - 6.0.5 + 6.0.6 Json.NET Json.NET is a popular high-performance JSON framework for .NET James Newton-King diff --git a/Build/build.ps1 b/Build/build.ps1 index 0e859534..a6c14a63 100644 --- a/Build/build.ps1 +++ b/Build/build.ps1 @@ -1,7 +1,7 @@ properties { - $zipFileName = "Json60r5.zip" + $zipFileName = "Json60r6.zip" $majorVersion = "6.0" - $majorWithReleaseVersion = "6.0.5" + $majorWithReleaseVersion = "6.0.6" $version = GetVersion $majorWithReleaseVersion $signAssemblies = $false $signKeyPath = "C:\Development\Releases\newtonsoft.snk" diff --git a/Src/Newtonsoft.Json.TestConsole/Newtonsoft.Json.TestConsole.csproj b/Src/Newtonsoft.Json.TestConsole/Newtonsoft.Json.TestConsole.csproj index da4fb970..f1f493da 100644 --- a/Src/Newtonsoft.Json.TestConsole/Newtonsoft.Json.TestConsole.csproj +++ b/Src/Newtonsoft.Json.TestConsole/Newtonsoft.Json.TestConsole.csproj @@ -17,7 +17,7 @@ true full false - bin\Debug\ + bin\Debug\Net45\ DEBUG;TRACE prompt 4 @@ -26,7 +26,7 @@ AnyCPU pdbonly true - bin\Release\ + bin\Release\Net45\ TRACE prompt 4 diff --git a/Src/Newtonsoft.Json.TestConsole/Program.cs b/Src/Newtonsoft.Json.TestConsole/Program.cs index 3f5f8d79..119b7677 100644 --- a/Src/Newtonsoft.Json.TestConsole/Program.cs +++ b/Src/Newtonsoft.Json.TestConsole/Program.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using System.Text; @@ -13,13 +14,19 @@ namespace Newtonsoft.Json.TestConsole public static void Main(string[] args) { Console.WriteLine("Json.NET Test Console"); + + string version = FileVersionInfo.GetVersionInfo(typeof (JsonConvert).Assembly.Location).FileVersion; + Console.WriteLine("Json.NET Version: " + version); Console.ReadKey(); + Console.WriteLine("Doing stuff..."); //PerformanceTests t = new PerformanceTests(); //t.DeserializeLargeJson(); - WriteLargeJson(); + //DeserializeLargeJson(); + //WriteLargeJson(); + DeserializeJson(); Console.WriteLine(); Console.WriteLine("Finished"); @@ -27,6 +34,19 @@ namespace Newtonsoft.Json.TestConsole Console.ReadKey(); } + public static void DeserializeJson() + { + PerformanceTests t = new PerformanceTests(); + t.Iterations = 50000; + t.Deserialize(); + } + + public static void DeserializeLargeJson() + { + PerformanceTests t = new PerformanceTests(); + t.DeserializeLargeJson(); + } + public static void WriteLargeJson() { var json = System.IO.File.ReadAllText("large.json"); @@ -35,6 +55,10 @@ namespace Newtonsoft.Json.TestConsole Console.WriteLine("Press any key to start serialize"); Console.ReadKey(); + Console.WriteLine("Serializing..."); + + Stopwatch sw = new Stopwatch(); + sw.Start(); for (int i = 0; i < 100; i++) { @@ -45,6 +69,10 @@ namespace Newtonsoft.Json.TestConsole serializer.Serialize(file, o); } } + + sw.Stop(); + + Console.WriteLine("Finished. Total seconds: " + sw.Elapsed.TotalSeconds); } } } diff --git a/Src/Newtonsoft.Json.TestConsole/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json.TestConsole/Properties/AssemblyInfo.cs index b780afa3..e875b0dc 100644 --- a/Src/Newtonsoft.Json.TestConsole/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json.TestConsole/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: // [assembly: AssemblyVersion("6.0.0.0")] [assembly: AssemblyVersion("6.0.0.0")] -[assembly: AssemblyFileVersion("6.0.5.17728")] +[assembly: AssemblyFileVersion("6.0.6.17729")] diff --git a/Src/Newtonsoft.Json.Tests/JsonConvertTest.cs b/Src/Newtonsoft.Json.Tests/JsonConvertTest.cs index 50f606ae..772d56ef 100644 --- a/Src/Newtonsoft.Json.Tests/JsonConvertTest.cs +++ b/Src/Newtonsoft.Json.Tests/JsonConvertTest.cs @@ -1191,7 +1191,7 @@ namespace Newtonsoft.Json.Tests public Nest A { get; set; } } - [Test(Description = "Verifies that parameterized JsonConverter constructors are invoked when 'params' are used in JsonConverterAttribute.")] + [Test] public void ParametersPassedToJsonConverterConstructor() { ClobberMyProperties clobber = new ClobberMyProperties { One = "Red", Two = "Green", Three = "Yellow", Four = "Black" }; @@ -1265,7 +1265,7 @@ namespace Newtonsoft.Json.Tests public string One { get; set; } } - [Test(Description = "Uses JsonConverter and ItemConverterParameters to demonstrate custom rounding of doubles on a property-by-property basis.")] + [Test] public void CustomDoubleRounding() { var measurements = new Measurements diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj index 5b53dd1b..215776df 100644 --- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj +++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj @@ -370,6 +370,9 @@ + + PreserveNewest + PreserveNewest diff --git a/Src/Newtonsoft.Json.Tests/PerformanceTests.cs b/Src/Newtonsoft.Json.Tests/PerformanceTests.cs index 69e629f2..7b505642 100644 --- a/Src/Newtonsoft.Json.Tests/PerformanceTests.cs +++ b/Src/Newtonsoft.Json.Tests/PerformanceTests.cs @@ -66,7 +66,7 @@ namespace Newtonsoft.Json.Tests [TestFixture] public class PerformanceTests : TestFixtureBase { - private const int Iterations = 100; + public int Iterations = 100; //private const int Iterations = 5000; #region Data @@ -135,7 +135,7 @@ namespace Newtonsoft.Json.Tests [Test] public void ReadLargeJson() { - for (int i = 0; i < 100; i++) + for (int i = 0; i < 10; i++) { using (var fs = System.IO.File.OpenText("large.json")) using (JsonTextReader jsonTextReader = new JsonTextReader(fs)) @@ -808,6 +808,8 @@ If attributes are not mentioned, default values are used in each case. #region Deserialize public void BenchmarkDeserializeMethod(SerializeMethod method, object json, int? iterations = null, bool warmUp = true) { + GC.Collect(); + if (warmUp) Deserialize(method, json); diff --git a/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs index d5718aa7..3a3d0e17 100644 --- a/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs @@ -74,4 +74,4 @@ using System.Security; // by using the '*' as shown below: [assembly: AssemblyVersion("6.0.0.0")] -[assembly: AssemblyFileVersion("6.0.5.17728")] +[assembly: AssemblyFileVersion("6.0.6.17729")] diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj b/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj index 8a9992e4..d54a54f3 100644 --- a/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj +++ b/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj @@ -291,6 +291,7 @@ + diff --git a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs index 457359d6..ef09c154 100644 --- a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs @@ -91,5 +91,5 @@ using System.Security; // by using the '*' as shown below: [assembly: AssemblyVersion("6.0.0.0")] -[assembly: AssemblyFileVersion("6.0.5.17728")] +[assembly: AssemblyFileVersion("6.0.6.17729")] [assembly: CLSCompliant(true)]