code: 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();
      }
docs: Read a JSON array