code: private void writeElements(SerIterator itemIterator) throws IOException {
          if (itemIterator.metaTypeRequired()) {
              output.writeObjectStart();
              output.writeObjectKeyValue(META, itemIterator.metaTypeName());
              output.writeObjectKey(VALUE);
          }
          if (itemIterator.category() == SerCategory.MAP) {
              writeMap(itemIterator);
          } else if (itemIterator.category() == SerCategory.COUNTED) {
              writeCounted(itemIterator);
          } else if (itemIterator.category() == SerCategory.TABLE) {
              writeTable(itemIterator);
          } else if (itemIterator.category() == SerCategory.GRID) {
              writeGrid(itemIterator);
          } else {
              writeArray(itemIterator);
          }
          if (itemIterator.metaTypeRequired()) {
              output.writeObjectEnd();
          }
      }
docs: write a collection