From 11310fdf05928d0b0642dbe8405acc1598e61b53 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Wed, 11 Apr 2012 18:39:43 +1200 Subject: [PATCH] -Incremented version to 4.5.2 -Fixed failing turkey test -XML documentation --- Build/Newtonsoft.Json.nuspec | 2 +- Build/build.ps1 | 2 +- Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs | 2 +- .../Serialization/JsonSerializerTest.cs | 4 ++-- Src/Newtonsoft.Json/JsonReader.cs | 3 +++ Src/Newtonsoft.Json/JsonSerializer.cs | 3 +++ Src/Newtonsoft.Json/JsonSerializerSettings.cs | 3 +++ Src/Newtonsoft.Json/Properties/AssemblyInfo.cs | 2 +- .../Serialization/DefaultContractResolver.cs | 10 ++++++++-- 9 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Build/Newtonsoft.Json.nuspec b/Build/Newtonsoft.Json.nuspec index dfb77cc5..ccc56f67 100644 --- a/Build/Newtonsoft.Json.nuspec +++ b/Build/Newtonsoft.Json.nuspec @@ -2,7 +2,7 @@ Newtonsoft.Json - 4.5.1 + 4.5.2 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 bf996c48..e5e777e0 100644 --- a/Build/build.ps1 +++ b/Build/build.ps1 @@ -1,7 +1,7 @@ properties { $zipFileName = "Json45r1.zip" $majorVersion = "4.5" - $majorWithReleaseVersion = "4.5.1" + $majorWithReleaseVersion = "4.5.2" $version = GetVersion $majorWithReleaseVersion $signAssemblies = $false $signKeyPath = "D:\Development\Releases\newtonsoft.snk" diff --git a/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs index 92d3cd87..31d37fe1 100644 --- a/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs @@ -72,5 +72,5 @@ using System.Security; // by using the '*' as shown below: [assembly: AssemblyVersion("4.5.0.0")] #if !PocketPC -[assembly: AssemblyFileVersion("4.5.1.14809")] +[assembly: AssemblyFileVersion("4.5.2.14811")] #endif diff --git a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs index 923bdfa7..0b7370ac 100644 --- a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs +++ b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs @@ -5890,7 +5890,7 @@ Parameter name: value" { public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { - writer.WriteValue(":::" + value.ToString().ToUpper() + ":::"); + writer.WriteValue(":::" + value.ToString().ToUpper(CultureInfo.InvariantCulture) + ":::"); } public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) @@ -5908,7 +5908,7 @@ Parameter name: value" { protected internal override string ResolvePropertyName(string propertyName) { - return ":::" + propertyName.ToUpper() + ":::"; + return ":::" + propertyName.ToUpper(CultureInfo.InvariantCulture) + ":::"; } } diff --git a/Src/Newtonsoft.Json/JsonReader.cs b/Src/Newtonsoft.Json/JsonReader.cs index 5254eb4a..40dd9d4c 100644 --- a/Src/Newtonsoft.Json/JsonReader.cs +++ b/Src/Newtonsoft.Json/JsonReader.cs @@ -150,6 +150,9 @@ namespace Newtonsoft.Json set { _dateTimeZoneHandling = value; } } + /// + /// Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + /// public int? MaxDepth { get { return _maxDepth; } diff --git a/Src/Newtonsoft.Json/JsonSerializer.cs b/Src/Newtonsoft.Json/JsonSerializer.cs index 77990576..e4102a7d 100644 --- a/Src/Newtonsoft.Json/JsonSerializer.cs +++ b/Src/Newtonsoft.Json/JsonSerializer.cs @@ -323,6 +323,9 @@ namespace Newtonsoft.Json set { _culture = value; } } + /// + /// Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + /// public virtual int? MaxDepth { get { return _maxDepth; } diff --git a/Src/Newtonsoft.Json/JsonSerializerSettings.cs b/Src/Newtonsoft.Json/JsonSerializerSettings.cs index e37251c6..d5404be6 100644 --- a/Src/Newtonsoft.Json/JsonSerializerSettings.cs +++ b/Src/Newtonsoft.Json/JsonSerializerSettings.cs @@ -126,6 +126,9 @@ namespace Newtonsoft.Json /// The context. public StreamingContext Context { get; set; } + /// + /// Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + /// public int? MaxDepth { get { return _maxDepth; } diff --git a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs index 6cafee23..61f5e43e 100644 --- a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs @@ -88,7 +88,7 @@ using System.Security; // by using the '*' as shown below: [assembly: AssemblyVersion("4.5.0.0")] #if !PocketPC -[assembly: AssemblyFileVersion("4.5.1.14809")] +[assembly: AssemblyFileVersion("4.5.2.14811")] #endif [assembly: CLSCompliant(true)] diff --git a/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs b/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs index 0636be60..2e3396ff 100644 --- a/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs +++ b/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs @@ -153,13 +153,19 @@ namespace Newtonsoft.Json.Serialization #if !(SILVERLIGHT || NETFX_CORE) /// - /// Gets or sets a value indicating whether to ignore the ISerializable interface when serializing and deserializing types. + /// Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. /// /// - /// true if the ISerializable interface will be ignored when serializing and deserializing types; otherwise, false. + /// true if the interface will be ignored when serializing and deserializing types; otherwise, false. /// public bool IgnoreSerializableInterface { get; set; } + /// + /// Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types. + /// + /// + /// true if the attribute will be ignored when serializing and deserializing types; otherwise, false. + /// public bool IgnoreSerializableAttribute { get; set; } #endif