private JsonToken startParsingObjectOrArray ( ) throws IOException { JsonToken currentToken = startParsing ( ) ; switch ( currentToken ) { case START_OBJECT : currentToken = nextToken ( ) ; Preconditions . checkArgument ( currentToken == JsonToken . FIELD_NAME || currentToken == JsonToken . END_OBJECT , currentToken ) ; break ; case START_ARRAY : currentToken = nextToken ( ) ; break ; default : break ; } return currentToken ; }
Starts parsing an object or array by making sure the parser points to an object field name first array value or end of object or array .