diff --git a/Src/Newtonsoft.Json.Tests/TestFixtureBase.cs b/Src/Newtonsoft.Json.Tests/TestFixtureBase.cs index 5a16f609..3ff2597f 100644 --- a/Src/Newtonsoft.Json.Tests/TestFixtureBase.cs +++ b/Src/Newtonsoft.Json.Tests/TestFixtureBase.cs @@ -178,7 +178,7 @@ namespace Newtonsoft.Json.Tests { try { - ; action(); + action(); Assert.Fail("Exception of type {0} expected; got none exception", typeof(TException).Name); } diff --git a/Src/Newtonsoft.Json/JsonTextReader.cs b/Src/Newtonsoft.Json/JsonTextReader.cs index c1acd2e1..fb9c25de 100644 --- a/Src/Newtonsoft.Json/JsonTextReader.cs +++ b/Src/Newtonsoft.Json/JsonTextReader.cs @@ -1289,7 +1289,7 @@ namespace Newtonsoft.Json else { double d; - if (double.TryParse(number, NumberStyles.Float | NumberStyles.AllowThousands, NumberFormatInfo.CurrentInfo, out d)) + if (double.TryParse(number, NumberStyles.Float | NumberStyles.AllowThousands, CultureInfo.InvariantCulture, out d)) numberValue = d; else throw JsonReaderException.Create(this, "Input string '{0}' is not a valid number.".FormatWith(CultureInfo.InvariantCulture, number)); diff --git a/Src/Newtonsoft.Json/Linq/JsonPath/JPath.cs b/Src/Newtonsoft.Json/Linq/JsonPath/JPath.cs index 7c4d6093..da37b05f 100644 --- a/Src/Newtonsoft.Json/Linq/JsonPath/JPath.cs +++ b/Src/Newtonsoft.Json/Linq/JsonPath/JPath.cs @@ -490,7 +490,7 @@ namespace Newtonsoft.Json.Linq.JsonPath if (numberText.IndexOfAny(new char[] { '.', 'E', 'e' }) != -1) { double d; - if (double.TryParse(numberText, out d)) + if (double.TryParse(numberText, NumberStyles.Float | NumberStyles.AllowThousands, CultureInfo.InvariantCulture, out d)) return d; else throw new JsonException("Could not read query value."); @@ -498,7 +498,7 @@ namespace Newtonsoft.Json.Linq.JsonPath else { long l; - if (long.TryParse(numberText, out l)) + if (long.TryParse(numberText, NumberStyles.Integer, CultureInfo.InvariantCulture, out l)) return l; else throw new JsonException("Could not read query value."); diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.ruleset b/Src/Newtonsoft.Json/Newtonsoft.Json.ruleset index d80dec16..ff6201db 100644 --- a/Src/Newtonsoft.Json/Newtonsoft.Json.ruleset +++ b/Src/Newtonsoft.Json/Newtonsoft.Json.ruleset @@ -1,5 +1,5 @@  - + @@ -67,6 +67,8 @@ + +