-Fixed number parsing culture bugs

This commit is contained in:
James Newton-King
2014-01-08 22:28:25 +13:00
parent 6562d9d31c
commit 62f6a2c256
4 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -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));