nextItem method
Moves to the next item in the collection.
Returns true
if there is another item to decode, otherwise false
.
Implementation
@override
bool nextItem() {
skipWhitespace();
switch (buffer[_offset++]) {
case tokenLBracket:
case tokenComma:
skipWhitespace();
if (buffer[_offset] == tokenRBracket) {
_offset++;
return false;
}
return true;
case tokenRBracket:
return false;
default:
_expect('[ or , or ]', _offset - 1);
}
}