code: private void writeMapComplex(SerIterator itemIterator) throws IOException {
          output.writeObjectStart();
          while (itemIterator.hasNext()) {
              itemIterator.next();
              Object key = itemIterator.key();
              if (key == null) {
                  throw new IllegalArgumentException("Unable to write map key as it cannot be null");
              }
              String str = settings.getConverter().convertToString(itemIterator.key());
              if (str == null) {
                  throw new IllegalArgumentException("Unable to write map key as it cannot be a null string");
              }
              output.writeObjectKey(str);
              writeObject(itemIterator.valueType(), itemIterator.value(), itemIterator);
          }
          output.writeObjectEnd();
      }
docs: write map with complex keys