whatIsNext method
Returns the type of the next value without consuming it.
Implementation
JsonType whatIsNext() {
_skipWhitespace();
switch (buffer[_offset]) {
case tokenDoubleQuote:
return JsonType.string;
case tokenT:
case tokenF:
return JsonType.bool;
case tokenN:
return JsonType.nil;
case tokenLBrace:
return JsonType.object;
case tokenLBracket:
return JsonType.array;
default:
return JsonType.number;
}
}