private Object ReadJson(String baseKey)
{
SkipWhiteSpace();
char ch = c;
NextChar();
switch (ch)
{
case '{': ProcessObject(baseKey); break;
case '}': token = OBJECT_END_TOKEN; break;
case '[':
if (c == '"')
{
ProcessList(baseKey); break;
}
else
{
ProcessArray(baseKey); break;
}
case ']': token = ARRAY_END_TOKEN; break;
case '"': token = ProcessString(); break;
case ',': token = COMMA_TOKEN; break;
case ':': token = COLON_TOKEN; break;
case 't':
NextChar(); NextChar(); NextChar();
token = true;
break;
case 'n':
NextChar(); NextChar(); NextChar();
token = null;
break;
case 'f':
NextChar(); NextChar(); NextChar(); NextChar();
token = false;
break;
default:
//c = ct.previous();
if (Char.IsDigit(ch) || ch == '-')
{
token = ProcessNumber(ch);
}
break;
}
return token;
}