private JSONValue ParseString()
{
string o = "";
this.Next();
while (this.idx < this.len)
{
object[] objArray1;
string str2;
int num = this.json.IndexOfAny(endcodes, this.idx);
if (num < 0)
{
throw new JSONParseException("missing '\"' to end string at " + this.PosMsg());
}
o = o + this.json.Substring(this.idx, num - this.idx);
if (this.json[num] == '"')
{
this.cur = this.json[num];
this.idx = num;
break;
}
num++;
if (num >= this.len)
{
throw new JSONParseException("End of json while parsing while parsing string at " + this.PosMsg());
}
char ch = this.json[num];
switch (ch)
{
case 'r':
o = o + '\r';
goto Label_029E;
case 't':
o = o + '\t';
goto Label_029E;
case 'u':
str2 = "";
if ((num + 4) >= this.len)
{
throw new JSONParseException("End of json while parsing while parsing unicode char near " + this.PosMsg());
}
break;
default:
if (((ch == '"') || (ch == '/')) || (ch == '\\'))
{
o = o + ch;
}
else if (ch == 'b')
{
o = o + '\b';
}
else if (ch == 'f')
{
o = o + '\f';
}
else
{
if (ch != 'n')
{
goto Label_026B;
}
o = o + '\n';
}
goto Label_029E;
}
str2 = (str2 + this.json[num + 1] + this.json[num + 2]) + this.json[num + 3] + this.json[num + 4];
try
{
int num2 = int.Parse(str2, NumberStyles.AllowHexSpecifier);
o = o + ((char) num2);
}
catch (FormatException)
{
throw new JSONParseException("Invalid unicode escape char near " + this.PosMsg());
}
num += 4;
goto Label_029E;
Label_026B:
objArray1 = new object[] { "Invalid escape char '", ch, "' near ", this.PosMsg() };
throw new JSONParseException(string.Concat(objArray1));
Label_029E:
this.idx = num + 1;
}
if (this.idx >= this.len)
{
throw new JSONParseException("End of json while parsing while parsing string near " + this.PosMsg());
}
this.cur = this.json[this.idx];
this.Next();
return new JSONValue(o);
}