private boolean firstValue = true;
// Handle 1. ] 2. value 3. ,value
@Override
public Event getNextEvent() {
JsonToken token = tokenizer.nextToken();
if (token == JsonToken.SQUARECLOSE) {
currentContext = stack.pop();
return Event.END_ARRAY;
}
if (firstValue) {
firstValue = false;
} else {
if (token != JsonToken.COMMA) {
throw parsingException(token, "[COMMA]");
}
token = tokenizer.nextToken();
}
if (token.isValue()) {
return token.getEvent();
} else if (token == JsonToken.CURLYOPEN) {
stack.push(currentContext);
currentContext = new ObjectContext();
return Event.START_OBJECT;
} else if (token == JsonToken.SQUAREOPEN) {