private JSONValue ParseNumber()
{
JSONValue value2;
string str = "";
if (this.cur == '-')
{
str = "-";
this.Next();
}
while ((this.cur >= '0') && (this.cur <= '9'))
{
str = str + this.cur;
this.Next();
}
if (this.cur == '.')
{
this.Next();
str = str + '.';
while ((this.cur >= '0') && (this.cur <= '9'))
{
str = str + this.cur;
this.Next();
}
}
if ((this.cur == 'e') || (this.cur == 'E'))
{
str = str + "e";
this.Next();
if ((this.cur != '-') && (this.cur != '+'))
{
str = str + this.cur;
this.Next();
}
while ((this.cur >= '0') && (this.cur <= '9'))
{
str = str + this.cur;
this.Next();
}
}
try
{
value2 = new JSONValue(Convert.ToSingle(str));
}
catch (Exception)
{
throw new JSONParseException("Cannot convert string to float : '" + str + "' at " + this.PosMsg());
}
return value2;
}