diff --git a/Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs b/Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs index b4150d60..33effc4a 100644 --- a/Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs +++ b/Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs @@ -26,6 +26,9 @@ using System; using System.Collections.Generic; using System.Globalization; +#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE) +using System.Numerics; +#endif using System.Text; #if !NETFX_CORE using NUnit.Framework; @@ -38,9 +41,6 @@ using Newtonsoft.Json; using System.IO; using System.Xml; using Newtonsoft.Json.Utilities; -#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE) -using System.Numerics; -#endif namespace Newtonsoft.Json.Tests { diff --git a/Src/Newtonsoft.Json.Tests/JsonTextWriterTest.cs b/Src/Newtonsoft.Json.Tests/JsonTextWriterTest.cs index 7cf1280d..7600e9d6 100644 --- a/Src/Newtonsoft.Json.Tests/JsonTextWriterTest.cs +++ b/Src/Newtonsoft.Json.Tests/JsonTextWriterTest.cs @@ -1361,7 +1361,7 @@ _____'propertyName': NaN if (QuoteName) _writer.Write(QuoteChar); - _writer.Write(new string(name.Reverse().ToArray())); + _writer.Write(new string(name.ToCharArray().Reverse().ToArray())); if (QuoteName) _writer.Write(QuoteChar); diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj index ed469769..eb7d71a6 100644 --- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj +++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj @@ -279,8 +279,10 @@ + + diff --git a/Src/Newtonsoft.Json.Tests/Utilities/DateTimeUtilsTests.cs b/Src/Newtonsoft.Json.Tests/Utilities/DateTimeUtilsTests.cs index 689d8f73..3d7a05ea 100644 --- a/Src/Newtonsoft.Json.Tests/Utilities/DateTimeUtilsTests.cs +++ b/Src/Newtonsoft.Json.Tests/Utilities/DateTimeUtilsTests.cs @@ -27,7 +27,13 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Text; -using NUnit.Framework; +#if !NETFX_CORE +using global::NUnit.Framework; +#else +using global::Microsoft.VisualStudio.TestPlatform.UnitTestFramework; +using TestFixture = global::Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using Test = global::Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +#endif using Newtonsoft.Json.Utilities; namespace Newtonsoft.Json.Tests.Utilities diff --git a/Src/Newtonsoft.Json.Tests/Utilities/StringUtilsTests.cs b/Src/Newtonsoft.Json.Tests/Utilities/StringUtilsTests.cs index 387cac9c..0da96411 100644 --- a/Src/Newtonsoft.Json.Tests/Utilities/StringUtilsTests.cs +++ b/Src/Newtonsoft.Json.Tests/Utilities/StringUtilsTests.cs @@ -23,7 +23,13 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion -using NUnit.Framework; +#if !NETFX_CORE +using global::NUnit.Framework; +#else +using global::Microsoft.VisualStudio.TestPlatform.UnitTestFramework; +using TestFixture = global::Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using Test = global::Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +#endif using Newtonsoft.Json.Utilities; namespace Newtonsoft.Json.Tests.Utilities diff --git a/Src/Newtonsoft.Json/Converters/JsonValueConverter.cs b/Src/Newtonsoft.Json/Converters/JsonValueConverter.cs index ef99fb7c..c87a8d40 100644 --- a/Src/Newtonsoft.Json/Converters/JsonValueConverter.cs +++ b/Src/Newtonsoft.Json/Converters/JsonValueConverter.cs @@ -146,11 +146,11 @@ namespace Newtonsoft.Json.Converters break; case JsonToken.Integer: case JsonToken.Float: - return JsonValue.CreateNumberValue(Convert.ToDouble(reader.Value)); + return JsonValue.CreateNumberValue(Convert.ToDouble(reader.Value, CultureInfo.InvariantCulture)); case JsonToken.String: return JsonValue.CreateStringValue(reader.Value.ToString()); case JsonToken.Boolean: - return JsonValue.CreateBooleanValue(Convert.ToBoolean(reader.Value)); + return JsonValue.CreateBooleanValue(Convert.ToBoolean(reader.Value, CultureInfo.InvariantCulture)); case JsonToken.Null: // surely there is a better way to create a null value than this? return JsonValue.Parse("null"); diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj b/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj index d968d5f9..d51d8057 100644 --- a/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj +++ b/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj @@ -258,6 +258,7 @@ +