-Numbers that contain e should be treated as doubles

This commit is contained in:
JamesNK
2008-05-04 03:16:34 +00:00
parent d88e2cf2ca
commit 5f19fd9a7a
2 changed files with 14 additions and 1 deletions
+2 -1
View File
@@ -596,7 +596,8 @@ namespace Newtonsoft.Json
object numberValue;
JsonToken numberType;
if (number.IndexOf('.') == -1)
if (number.IndexOf(".", StringComparison.OrdinalIgnoreCase) == -1
&& number.IndexOf("e", StringComparison.OrdinalIgnoreCase) == -1)
{
numberValue = Convert.ToInt64(_buffer.ToString(), CultureInfo.InvariantCulture);
numberType = JsonToken.Integer;