code: private void parseArray(String fieldName) {
          int chr;
          int idx = 0;
          while (true) {
              sr.skipWhitespaceRead();
              sr.unreadLastCharacter();
              parseValue(fieldName + "[" + (idx++) + "]");
              
              chr = sr.skipWhitespaceRead();
              if (chr == END_ARRAY) {
                  break;
              }
              
              if (chr != VALUE_SEPARATOR) {
                  throw new IllegalArgumentException("Expected ',' or ']' inside array at position " + sr.getPosition());
              }
          }
      }
docs: Read a JSON array