private Object readArray ( JsonObject object ) throws IOException { final List < Object > array = new ArrayList ( ) ; while ( true ) { final Object o = readValue ( object ) ; if ( o != EMPTY_ARRAY ) { array . add ( o ) ; } final int c = skipWhitespaceRead ( ) ; if ( c == ' ' ) { break ; } else if ( c != ' ' ) { error ( "Expected ',' or ']' inside array" ) ; } } return array . toArray ( ) ; }
Read a JSON array